Embedded Checkout
Embed a payment form directly into your application using an iframe
The Embedded Checkout solution provides a seamless in-app payment experience. The payment form is embedded directly into your application using an iframe, keeping users on your platform throughout the transaction.
Best for:
- Seamless user experience
- Brand consistency
- Reduced user drop-off
Available Payment Methods
- Credit/Debit Cards (Visa, Mastercard, Amex)
- Apple Pay & Google Pay
- Open Banking
- Bank Transfer
How It Works
An embedded checkout integration has two parts: a one-time setup you complete before going live, and the flow you run to take payments.
One-time setup
1. Register your domains
During onboarding, provide every domain that will host the checkout iframe, including staging and local development environments. The checkout only loads on registered domains. On any other domain, the browser blocks the iframe and the payer sees an empty or error frame.
2. Host the Apple Pay domain association file
Serve Esenda's domain association file from each domain you registered. This is required for every integration, even if you don't plan to offer Apple Pay yet.
Both steps are covered in Domain Setup.
Taking payments
3. Authenticate with API
Obtain an access token using your API credentials (client_id & client_secret). See Authentication.
4. Create a checkout session
Make a POST request to create a checkout session with payment details and customer information. Each session is tied to a single order, so create a new one for each payment. See Checkout Session Request.
5. Embed the iframe
Load the returned checkout_session_url in an <iframe> on one of your registered domains. The iframe needs the allow="payment; clipboard-write" attribute, or parts of the checkout will fail. See Iframe Setup.
To match the checkout to your brand, see Iframe Customisation.
6. Receive updates
Get real-time order status updates via Webhooks. You can also listen for in-page events via Embedded Flow Events.