Overview
Inline checkout lets you create fully integrated checkout experiences that blend seamlessly with your website or application. Unlike the overlay checkout, which opens as a modal on top of your page, inline checkout embeds the payment form directly into your page layout. Using inline checkout, you can:- Create checkout experiences that are fully integrated with your app or website
- Let Dodo Payments securely capture customer and payment information in an optimized checkout frame
- Display items, totals, and other information from Dodo Payments on your page
- Use SDK methods and events to build advanced checkout experiences

How It Works
Inline checkout works by embedding a secure Dodo Payments frame into your website or app. The checkout frame handles collecting customer information and capturing payment details. Your page displays the items list, totals, and options for changing what’s on the checkout. The SDK lets your page and the checkout frame interact with each other. Dodo Payments automatically creates a subscription when a checkout completes, ready for you to provision.The inline checkout frame securely handles all sensitive payment information, ensuring PCI compliance without additional certification on your end.
What Makes a Good Inline Checkout?
It’s important that customers know who they’re buying from, what they’re buying, and how much they’re paying. To build an inline checkout that’s compliant and optimized for conversion, your implementation must include:
Example inline checkout layout showing required elements
- Recurring information: If recurring, how often it recurs and the total to pay on renewal. If a trial, how long the trial lasts.
- Item descriptions: A description of what’s being purchased.
- Transaction totals: Transaction totals, including subtotal, total tax, and grand total. Be sure to include the currency too.
- Dodo Payments footer: The full inline checkout frame, including the checkout footer that has information about Dodo Payments, our terms of sale, and our privacy policy.
- Refund policy: A link to your refund policy, if it differs from the Dodo Payments standard refund policy.
Customer Journey
The checkout flow is determined by your checkout session configuration. Depending on how you configure the checkout session, customers will experience a checkout that may present all information on a single page or across multiple steps.1
Customer opens checkout
You can open inline checkout by passing items or an existing transaction. Use the SDK to show and update on-page information, and SDK methods to update items based on customer interaction.

2
Customer enters their details
Inline checkout first asks customers to enter their email address, select their country, and (where required) enter their ZIP or postal code. This step gathers all necessary information to determine taxes and available payment options.You can prefill customer details and present saved addresses to streamline the experience.
3
Customer selects payment method
After entering their details, customers are presented with available payment methods and the payment form. Options may include credit or debit card, PayPal, Apple Pay, Google Pay, and other local payment methods based on their location.Display saved payment methods if available to speed up checkout.

4
Checkout completed
Dodo Payments routes every payment to the best acquirer for that sale to get the best possible chance of success. Customers enter a success workflow that you can build.

5
Dodo Payments creates subscription
Dodo Payments automatically creates a subscription for the customer, ready for you to provision. The payment method the customer used is held on file for renewals or subscription changes.

Quick Start
Get started with the Dodo Payments Inline Checkout in just a few lines of code:Step-by-Step Integration Guide
1
Install the SDK
Install the Dodo Payments Checkout SDK:
2
Initialize the SDK for Inline Display
Initialize the SDK and specify
displayType: 'inline'. You should also listen for the checkout.breakdown event to update your UI with real-time tax and total calculations.3
Create a Container Element
Add an element to your HTML where the checkout frame will be injected:
4
Open the Checkout
Call
DodoPayments.Checkout.open() with the checkoutUrl and the elementId of your container:5
Test Your Integration
- Start your development server:
- Test the checkout flow:
- Enter your email and address details in the inline frame.
- Verify that your custom order summary updates in real-time.
- Test the payment flow using test credentials.
- Confirm redirects work correctly.
You should see
checkout.breakdown events logged in your browser console if you added a console log in the onEvent callback.6
Go Live
When you’re ready for production:
- Change the mode to
'live':
- Update your checkout URLs to use live checkout sessions from your backend.
- Test the complete flow in production.
Complete React Example
This example demonstrates how to implement a custom order summary alongside the inline checkout, keeping them in sync using thecheckout.breakdown event.
API Reference
Configuration
Initialize Options
| Option | Type | Required | Description |
|---|---|---|---|
mode | "test" | "live" | Yes | Environment mode. |
displayType | "inline" | "overlay" | Yes | Must be set to "inline" to embed the checkout. |
onEvent | function | Yes | Callback function for handling checkout events. |
Checkout Options
| Option | Type | Required | Description |
|---|---|---|---|
checkoutUrl | string | Yes | Checkout session URL. |
elementId | string | Yes | The id of the DOM element where the checkout should be rendered. |
options.showTimer | boolean | No | Show or hide the checkout timer. Defaults to true. When disabled, you will receive the checkout.link_expired event when the session expires. |
options.showSecurityBadge | boolean | No | Show or hide the security badge. Defaults to true. |
options.manualRedirect | boolean | No | When enabled, the checkout will not automatically redirect after completion. Instead, you will receive checkout.status and checkout.redirect_requested events to handle the redirect yourself. |
options.themeConfig | ThemeConfig | No | Custom theme configuration. |
options.payButtonText | string | No | Custom text to display on the pay button. |
options.fontSize | FontSize | No | Global font size for the checkout. |
options.fontWeight | FontWeight | No | Global font weight for the checkout. |
Methods
Open Checkout
Opens the checkout frame in the specified container.manualRedirect, handle the checkout completion in your onEvent callback:
Close Checkout
Programmatically removes the checkout frame and cleans up event listeners.Check Status
Returns whether the checkout frame is currently injected.Events
The SDK provides real-time events through theonEvent callback. For inline checkout, checkout.breakdown is particularly useful for syncing your UI.
| Event Type | Description |
|---|---|
checkout.opened | Checkout frame has been loaded. |
checkout.breakdown | Fired when prices, taxes, or discounts are updated. |
checkout.customer_details_submitted | Customer details have been submitted. |
checkout.pay_button_clicked | Fired when the customer clicks the pay button. Useful for analytics and tracking conversion funnels. |
checkout.redirect | Checkout will perform a redirect (e.g., to a bank page). |
checkout.error | An error occurred during checkout. |
checkout.link_expired | Fired when the checkout session expires. Only received when showTimer is set to false. |
checkout.status | Fired when manualRedirect is enabled. Contains the checkout status (succeeded, failed, or processing). |
checkout.redirect_requested | Fired when manualRedirect is enabled. Contains the URL to redirect the customer to. |
Checkout Breakdown Data
Thecheckout.breakdown event provides the following data:
Checkout Status Event Data
WhenmanualRedirect is enabled, you receive the checkout.status event with the following data:
Checkout Redirect Requested Event Data
WhenmanualRedirect is enabled, you receive the checkout.redirect_requested event with the following data:
Understanding the Breakdown Event
Thecheckout.breakdown event is the primary way to keep your application’s UI in sync with the Dodo Payments checkout state.
When it fires:
- On initialization: Immediately after the checkout frame is loaded and ready.
- On address change: Whenever the customer selects a country or enters a postal code that results in a tax recalculation.
| Field | Description |
|---|---|
subTotal | The sum of all line items in the session before any discounts or taxes are applied. |
discount | The total value of all applied discounts. |
tax | The calculated tax amount. In inline mode, this updates dynamically as the user interacts with the address fields. |
total | The mathematical result of subTotal - discount + tax in the session’s base currency. |
currency | The ISO currency code (e.g., "USD") for the standard subtotal, discount, and tax values. |
finalTotal | The actual amount the customer is charged. This may include additional foreign exchange adjustments or local payment method fees that aren’t part of the basic price breakdown. |
finalTotalCurrency | The currency in which the customer is actually paying. This can differ from currency if purchasing power parity or local currency conversion is active. |
- Currency Formatting: Prices are always returned as integers in the smallest currency unit (e.g., cents for USD, yen for JPY). To display them, divide by 100 (or the appropriate power of 10) or use a formatting library like
Intl.NumberFormat. - Handling Initial States: When the checkout first loads,
taxanddiscountmay be0ornulluntil the user provides their billing information or applies a code. Your UI should handle these states gracefully (e.g., showing a dash—or hiding the row). - The “Final Total” vs “Total”: While
totalgives you the standard price calculation,finalTotalis the source of truth for the transaction. IffinalTotalis present, it reflects exactly what will be charged to the customer’s card, including any dynamic adjustments. - Real-time Feedback: Use the
taxfield to show users that taxes are being calculated in real-time. This provides a “live” feel to your checkout page and reduces friction during the address entry step.
Implementation Options
Package Manager Installation
Install via npm, yarn, or pnpm as shown in the Step-by-Step Integration Guide.CDN Implementation
For quick integration without a build step, you can use our CDN:Theme Customization
You can customize the checkout appearance by passing athemeConfig object in the options parameter when opening checkout. The theme configuration supports both light and dark modes, allowing you to customize colors, borders, text, buttons, and border radius.
Basic Theme Configuration
Complete Theme Configuration
All available theme properties:Light Mode Only
If you only want to customize the light theme:Dark Mode Only
If you only want to customize the dark theme:Partial Theme Override
You can override only specific properties. The checkout will use default values for properties you don’t specify:Theme Configuration with Other Options
You can combine theme configuration with other checkout options:TypeScript Types
For TypeScript users, all theme configuration types are exported:Error Handling
The SDK provides detailed error information through the event system. Always implement proper error handling in youronEvent callback:
Best Practices
- Responsive Design: Ensure your container element has enough width and height. The iframe will typically expand to fill its container.
- Synchronization: Use the
checkout.breakdownevent to keep your custom order summary or pricing tables in sync with what the user sees in the checkout frame. - Skeleton States: Show a loading indicator in your container until the
checkout.openedevent fires. - Cleanup: Call
DodoPayments.Checkout.close()when your component unmounts to clean up the iframe and event listeners.
For dark mode implementations, it’s recommended to use
#0d0d0d as the background color for optimal visual integration with the inline checkout frame.Payment Status Validation
Why Server-Side Validation is Essential
While inline checkout events likecheckout.status provide real-time feedback, they should not be your only source of truth for payment status. Network issues, browser crashes, or users closing the page can cause events to be missed. To ensure reliable payment validation:
- Your server should listen to webhook events - Dodo Payments sends webhooks for payment status changes
- Implement a polling mechanism - Your frontend should poll your server for status updates
- Combine both approaches - Use webhooks as the primary source and polling as a fallback
Recommended Architecture
Implementation Steps
1. Listen for checkout events - When the user clicks pay, start preparing to verify the status:payment.succeeded or payment.failed webhooks. See our Webhooks documentation for details.
Handling Redirects (3DS, Google Pay, UPI)
When usingmanualRedirect: true, certain payment methods require redirecting the user away from your page for authentication:
- 3D Secure (3DS) - Card authentication
- Google Pay - Wallet authentication on some flows
- UPI - Indian payment method redirects
checkout.redirect_requested event. Redirect the user to the provided URL:
- Check if the user is returning from a redirect (e.g., via
sessionStorage) - Start polling your server for the confirmed payment status
- Show a “Verifying payment…” state while polling
- Display success/failure UI based on the server-confirmed status
Troubleshooting
Checkout frame is not appearing
Checkout frame is not appearing
- Verify that
elementIdmatches theidof adivthat actually exists in the DOM. - Ensure
displayType: 'inline'was passed toInitialize. - Check that the
checkoutUrlis valid.
Taxes are not updating in my UI
Taxes are not updating in my UI
- Ensure you are listening for the
checkout.breakdownevent. - Taxes are only calculated after the user enters a valid country and postal code in the checkout frame.
Enabling Apple Pay
Apple Pay allows customers to complete payments quickly and securely using their saved payment methods. When enabled, customers can launch the Apple Pay modal directly from the checkout overlay on supported devices.Apple Pay is supported on iOS 17+, iPadOS 17+, and Safari 17+ on macOS.
1
Download and upload the Apple Pay domain association file
Download the Apple Pay domain association file.Upload the file to your web server at
/.well-known/apple-developer-merchantid-domain-association. For example, if your website is example.com, make the file available at https://example.com/well-known/apple-developer-merchantid-domain-association.2
Request Apple Pay activation
Email [email protected] with the following information:
- Your production domain URL (e.g.,
https://example.com) - Request to enable Apple Pay for your domain
You’ll receive confirmation within 1-2 working days once Apple Pay has been enabled for your domain.
3
Verify Apple Pay availability
After receiving confirmation, test Apple Pay in your checkout:
- Open your checkout on a supported device (iOS 17+, iPadOS 17+, or Safari 17+ on macOS)
- Verify that the Apple Pay button appears as a payment option
- Test the complete payment flow
Browser Support
The Dodo Payments Checkout SDK supports the following browsers:- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- IE11+
Inline vs Overlay Checkout
Choose the right checkout type for your use case:| Feature | Inline Checkout | Overlay Checkout |
|---|---|---|
| Integration depth | Fully embedded in page | Modal on top of page |
| Layout control | Full control | Limited |
| Branding | Seamless | Separate from page |
| Implementation effort | Higher | Lower |
| Best for | Custom checkout pages, high-conversion flows | Quick integration, existing pages |
Related Resources
Overlay Checkout
Use the overlay checkout for quick modal-based integration.
Checkout Sessions API
Create checkout sessions to power your checkout experiences.
Webhooks
Handle payment events server-side with webhooks.
Integration Guide
Complete guide to integrating Dodo Payments.