Skip to main content

Rails demo

Build a Rails storefront with embedded, modal, and hosted Checkout. Rails creates the order on the server.

What you’ll build

  • A Rails 8 storefront with framework-native controllers and services
  • Order creation with the Inttegro Ruby SDK
  • Server-only credentials and safe customer errors
  • ERB views progressively enhanced with @inttegro/js

See the flow

The gallery shows one server-created order in each Checkout presentation. The Ruby SDK and API key stay on the server.

Select any image to view it full screen.

Run the demo

Install the gems with Bundler, set the environment values, and start Rails. The released README has the exact commands.

Key files

  1. checkout_service.rb creates the order and maps safe errors.
  2. checkouts_controller.rb validates the request and returns JSON or a 303 redirect.
  3. public/checkout-presentations.js presents Checkout in all three modes.

Before you ship

Keep the Inttegro credential on the server. Store the cart and order IDs together, then verify payment before fulfillment.

Next