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:
- 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.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.

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.
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.

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.

Quick Start
Get started with the Dodo Payments Inline Checkout in just a few lines of code:Step-by-Step Integration Guide
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.Open the Checkout
Call
DodoPayments.Checkout.open() with the checkoutUrl and the elementId of your container: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.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 | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
checkoutUrl | string | Ja | URL der Checkout-Sitzung. |
elementId | string | Ja | Das id des DOM-Elements, in dem der Checkout gerendert werden soll. |
options.showTimer | boolean | Nein | Zeige oder verberge den Checkout-Timer. Standardmäßig true. Wenn deaktiviert, erhältst du das checkout.link_expired-Ereignis, wenn die Sitzung abläuft. |
options.showSecurityBadge | boolean | Nein | Zeige oder verberge das Sicherheitsabzeichen. Standardmäßig true. |
options.manualRedirect | boolean | Nein | Wenn aktiviert, leitet der Checkout nach dem Abschluss nicht automatisch weiter. Stattdessen erhältst du checkout.status- und checkout.redirect_requested-Ereignisse, um die Weiterleitung selbst zu verwalten. |
options.payButtonText | string | Nein | Benutzerdefinierter Text, der auf der Bezahl-Schaltfläche angezeigt wird. |
options.fontSize | FontSize | Nein | Globale Schriftgröße für den Checkout. |
options.fontWeight | FontWeight | Nein | Globales Schriftgewicht für den 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.form_ready | Checkout form is ready to receive user input. Useful for hiding loading states and showing the checkout UI. |
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:Zahlungsmethode aktualisieren
Der Inline-Checkout unterstützt Aktualisierungen der Zahlungsmethode für Abonnements. Wenn ein Kunde seine Zahlungsmethode aktualisieren muss – sei es für ein aktives Abonnement oder um ein pausiertes Abonnement wieder zu aktivieren – kannst du den Aktualisierungsablauf direkt in deinem Seitenlayout rendern.Funktionsweise
- Rufe die Update Payment Method API auf, um ein
payment_linkzu erhalten:
- Gib das zurückgegebene
payment_linkalscheckoutUrlweiter, um den Inline-Checkout zu öffnen:
Für pausierte Abonnements
Beim Aktualisieren der Zahlungsmethode für ein Abonnement imon_hold-Status erstellt Dodo Payments automatisch eine Gebühr für ausstehende Zahlungen. Überwache die payment.succeeded- und subscription.active-Webhooks, um die Reaktivierung zu bestätigen.
Fehlerbehandlung
Das SDK liefert detaillierte Fehlerinformationen über das Ereignissystem. Implementiere immer eine geeignete Fehlerbehandlung in deinemonEvent-Callback:
Beste Vorgehensweisen
- Responsives Design: Sorge dafür, dass dein Container-Element ausreichend Breite und Höhe hat. Das iframe erweitert sich in der Regel, um seinen Container auszufüllen.
- Synchronisation: Verwende das
checkout.breakdown-Ereignis, um deine benutzerdefinierten Bestellübersichten oder Preistabellen mit dem abzugleichen, was der Nutzer im Checkout-Frame sieht. - Skeleton-Zustände: Zeige einen Ladeindikator in deinem Container, bis das
checkout.opened-Ereignis ausgelöst wird. - Aufräumen: Rufe
DodoPayments.Checkout.close()auf, wenn deine Komponente demontiert wird, um das iframe und die Ereignislistener zu bereinigen.
Für Dark-Mode-Implementierungen wird empfohlen,
#0d0d0d als Hintergrundfarbe zu verwenden, um eine optimale optische Integration mit dem Inline-Checkout-Frame zu gewährleisten.Validierung des Zahlungsstatus
Warum serverseitige Validierung unerlässlich ist
Während Inline-Checkout-Ereignisse wiecheckout.status Echtzeit-Feedback bieten, sollten sie nicht deine einzige verlässliche Quelle für den Zahlungsstatus sein. Netzwerkprobleme, Browserabstürze oder das Schließen der Seite durch Benutzer können dazu führen, dass Ereignisse verloren gehen. Zur zuverlässigen Zahlungsvalidierung:
- Dein Server sollte auf Webhook-Ereignisse hören – Dodo Payments sendet Webhooks für Änderungen des Zahlungsstatus
- Implementiere einen Polling-Mechanismus – Dein Frontend sollte deinen Server nach Statusaktualisierungen abfragen
- Kombiniere beide Ansätze – Nutze Webhooks als primäre Quelle und Polling als Fallback
Empfohlene Architektur
Implementierungsschritte
1. Höre auf Checkout-Ereignisse – Wenn der Nutzer auf Bezahlen klickt, beginne mit der Vorbereitung zur Überprüfung des Status:payment.succeeded- oder payment.failed-Webhooks sendet. Siehe unsere Webhooks documentation für Details.
Behandlung von Weiterleitungen (3DS, Google Pay, UPI)
Beim Einsatz vonmanualRedirect: true erfordern bestimmte Zahlungsmethoden eine Weiterleitung des Nutzers von deiner Seite zur Authentifizierung:
- 3D Secure (3DS) – Karten-Authentifizierung
- Google Pay – Wallet-Authentifizierung in einigen Abläufen
- UPI – Indische Zahlungsmethode mit Weiterleitung
checkout.redirect_requested-Ereignis. Leite den Nutzer zur angegebenen URL weiter:
- Prüfe, ob der Nutzer von einer Weiterleitung zurückkehrt (z. B. über
sessionStorage) - Beginne, deinen Server nach dem bestätigten Zahlungsstatus abzufragen
- Zeige einen “Zahlung wird überprüft…”-Status an, während du abfragst
- Stelle die Erfolgs-/Fehleroberfläche basierend auf dem serverbestätigten Status dar
Fehlerbehebung
Checkout frame is not appearing
Checkout frame is not appearing
- Überprüfe, ob
elementIdmit demideinesdivübereinstimmt, der tatsächlich im DOM vorhanden ist. - Stelle sicher, dass
displayType: 'inline'anInitializeübergeben wurde. - Überprüfe, ob der
checkoutUrlgültig ist.
Taxes are not updating in my UI
Taxes are not updating in my UI
- Stelle sicher, dass du auf das
checkout.breakdown-Ereignis hörst. - Steuern werden erst berechnet, nachdem der Nutzer ein gültiges Land und eine Postleitzahl im Checkout-Frame eingegeben hat.
Aktivierung digitaler Wallets
Für detaillierte Informationen zur Einrichtung von Apple Pay, Google Pay und anderen digitalen Wallets siehe die Digital Wallets-Seite.Schnellstart für Apple Pay
Download domain association file
Lade die Apple Pay domain association file herunter.
Request activation
Sende eine E-Mail an support@dodopayments.com mit deiner Produktionsdomain-URL und forder die Aktivierung von Apple Pay an.
Browserunterstützung
Das Dodo Payments Checkout SDK unterstützt die folgenden Browser:- Chrome (neueste Version)
- Firefox (neueste Version)
- Safari (neueste Version)
- Edge (neueste Version)
- IE11+
Inline- vs. Overlay-Checkout
Wähle den passenden Checkout-Typ für deinen Anwendungsfall:| Merkmal | Inline-Checkout | Overlay-Checkout |
|---|---|---|
| Integrationstiefe | Vollständig in die Seite eingebettet | Modal über der Seite |
| Layoutkontrolle | Volle Kontrolle | Eingeschränkt |
| Branding | Nahtlos | Getrennt von der Seite |
| Implementierungsaufwand | Höher | Geringer |
| Am besten geeignet für | Benutzerdefinierte Checkout-Seiten, hochkonvertierende Abläufe | Schnelle Integration, bestehende Seiten |
Weitere Ressourcen
Overlay Checkout
Verwende den Overlay-Checkout für eine schnelle modalbasierte Integration.
Checkout Sessions API
Erstelle Checkout-Sitzungen, um deine Checkout-Erlebnisse anzutreiben.
Webhooks
Verarbeite Zahlungsereignisse serverseitig mit Webhooks.
Integration Guide
Umfassende Anleitung zur Integration von Dodo Payments.
