Skip to main content
Your platform can show embedded checkout on the website it runs for a connected account. The payment belongs to that account. A merchant’s checkout loads only on the websites registered for that merchant, so a site you register for one merchant never runs another merchant’s checkout.

Before you begin

  • Use a platform secret key with sessions:write, web_domains:read, and web_domains:write for the mode you are working in. In Connect → API keys, the Payments integration preset includes them.
  • Each merchant’s connection must grant sessions:write, and sessions:read to list domains. Access to create a merchant’s checkout sessions also lets you register where they run, so merchants approve nothing extra.
Every request below sends the merchant’s ID in Ionic-Account.

1. Register the merchant’s website

Register the origin of the page where the merchant’s customers pay. Do this once per merchant and mode, for example right after the merchant connects.
Matching uses the exact origin: scheme, hostname, and port. Register each subdomain separately. Public sites require HTTPS. You can register the same site for several merchants. Each of them can then run checkout on it, so a site per merchant keeps merchants separate.

2. Create a checkout session for the merchant

Return the session’s id, client_secret, and embed_url to the merchant’s page and mount it as described in embedded checkout. The frame loads only on a website registered for the session’s merchant. If your page sends a Content Security Policy, add the checkout entries.

Add Apple Pay

  1. Download the verification file from https://app.ionicfi.com/.well-known/apple-developer-merchantid-domain-association. The same file serves every domain.
  2. Serve it unchanged on the merchant’s site at https://clinic-a.your-platform.com/.well-known/apple-developer-merchantid-domain-association. Return HTTP 200 directly, with no redirect or login.
  3. Register the domain for Apple Pay with the merchant’s account:
    Check apple_pay.status in the response. A failed status comes with an apple_pay.error that says what to fix.
  4. Pass applePay: true when you mount checkout, and add the Apple Pay policy entries if your page sends a Content Security Policy.

Manage the merchant’s domains

  • GET /v1/web_domains with Ionic-Account lists only the domains your platform added for that merchant.
  • DELETE /v1/web_domains/{id} removes one. A domain registered for Apple Pay is deregistered first.
  • The merchant sees these domains in its dashboard, marked with your platform, and can remove them.
  • When the connection is suspended or ends, the domains your platform added stop working immediately and checkout no longer loads on them. They work again if a suspended connection is restored.
Ionic Blocks still uses your platform’s own payment domains, registered without Ionic-Account.

Errors