---
title: "Rails demo"
description: "Explore a Rails storefront built with the Inttegro Ruby SDK."
canonical: "https://studio.inttegro.com/demos/rails"
format: inttegro-machine-docs/v1
language: "C#"
sdk_version: "v10.3.0"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/csharp/readers/index.json"
reader_identification: "Optional: declare your client only if known and your current-session capabilities; use reader_manifest for supplemental recommendations."
preamble_estimated_tokens: 374
model_token_report: "https://studio.inttegro.com/machine/token-report.json"
preamble_questions: 5
preamble_source: "general"
recommended_mcp_tools: []
estimated_tokens: 1106
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

**Summary:** Explore a Rails storefront built with the Inttegro Ruby SDK. This C# representation uses the selected SDK's native names wherever Studio has a verified mapping.

### Five questions

#### Q1. When should the reader use Rails demo?

Use this demo guide to inspect a complete working integration and compare it with the application being built.

#### Q2. What is authoritative on this page?

The demo proves one working composition, not the only supported architecture. Follow its linked SDK and API pages for current contracts.

#### Q3. What page-specific constraint matters most?

Do not copy demo credentials, identifiers, or deployment assumptions. Recreate configuration through supported public setup paths.

#### Q4. Can Inttegro MCP materially help with this task?

No catalog ability is sufficiently specific to recommend for this page. Use the documentation directly; consult the MCP catalog only if the task later requires governed live account context or a supported operation.

#### Q5. How should the reader verify the answer and continue?

Open the hosted experience, trace the corresponding source, and verify that its SDK and API usage still matches the current linked documentation. Continue with [Read the Orders API](https://studio.inttegro.com/machine/csharp/api/orders.md) and [Accept payment with Inttegro Checkout](https://studio.inttegro.com/machine/csharp/guides/accept-payment-with-inttegro-checkout.md) when those concerns enter scope.

## Document content

# Rails demo

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

> Demo Release is interactive content. Use the canonical page to view it.

## What you’ll build

- A [Rails 8](https://guides.rubyonrails.org/getting_started.html) storefront
  with framework-native controllers and services
- Order creation with the [Inttegro Ruby SDK](https://studio.inttegro.com/machine/csharp/sdks/ruby.md)
- Server-only credentials and safe customer errors
- ERB views progressively enhanced with [`@inttegro/js`](https://studio.inttegro.com/machine/csharp/web/javascript.md)

## See the flow

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

> Demo Presentation Gallery is interactive content. Use the canonical page to view it.

## Run the demo

Install the gems with [Bundler](https://bundler.io/guides/getting_started.html),
set the environment values, and start Rails. The
[released README](https://github.com/inttegro/inttegro-demos/blob/rails-v1.8.3/rails/README.md)
has the exact commands.

## Key files

1. [`checkout_service.rb`](https://github.com/inttegro/inttegro-demos/blob/rails-v1.8.3/rails/app/services/checkout_service.rb)
   creates the order and maps safe errors.
2. [`checkouts_controller.rb`](https://github.com/inttegro/inttegro-demos/blob/rails-v1.8.3/rails/app/controllers/checkouts_controller.rb)
   validates the request and returns JSON or a `303` redirect.
3. [`public/checkout-presentations.js`](https://github.com/inttegro/inttegro-demos/blob/rails-v1.8.3/rails/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

- [Browse the released source](https://github.com/inttegro/inttegro-demos/tree/rails-v1.8.3/rails)
- [Accept payment with Inttegro Checkout](https://studio.inttegro.com/machine/csharp/guides/accept-payment-with-inttegro-checkout.md)
- [Read the Orders API](https://studio.inttegro.com/machine/csharp/api/orders.md)
