Skip to main content
Connect lets a platform accept payments for businesses connected to it. Your platform runs the website and the integration. Each connected merchant owns the payments, customers, and saved cards that belong to it.

Who is involved

A connected merchant is identified by its Ionic merchant ID, such as mer_BBBBBBBBBBBBBB. Store this ID on your own merchant record when the business connects to your platform. Merchant-scoped Connect requests select a merchant with it; platform-level requests do not.

Platform keys

Create platform keys in Connect → API keys. One publishable key serves every merchant connected to your platform. Test keys select test mode and live keys select live mode. Connections, customers, and object IDs are separate in each mode.

Selecting a merchant

A request that acts for a connected merchant names that merchant once. On your server, send the Ionic-Account header with the platform secret key, or pass the account request option to the server SDK. The SDK sends the header for that request:
In the browser, pass the same merchant when you create the Ionic client:
The merchant is fixed for that client. To collect for a different merchant, create a new client. PaymentIntents, SetupIntents, and customers accept a merchant selection; each endpoint that accepts Ionic-Account says so in the API reference. Payment domains and platform webhook endpoints belong to the platform itself, so those requests carry no merchant selection.

Permissions

A Connect request succeeds when the platform key and the merchant’s connection both grant the permission the operation needs.

Payment domains

Register each website your platform operates in Connect → Payment domains, once per mode. Connected merchants with an active connection and the required permissions can use that website with your platform publishable key. See Platform payment domains.

Webhooks

A platform webhook endpoint receives eligible events from merchants with active connections and the matching resource read permission. Each event names the merchant that owns the object in event.account. Match it to the merchant stored with the payment before acting on the event. See Platform webhooks.

Connect your first merchant

Follow Connect a merchant to request access, handle the merchant’s approval, and save the merchant ID for subsequent requests.

Next steps

Accept payments

Create a PaymentIntent for a connected merchant and collect the card with Ionic Blocks.

Save cards

Save a card for a connected merchant’s customer without taking a payment.