Skip to main content
POST

Authorizations

Authorization
string
header
required

A Platform Connect secret key (sk_…) sent as Authorization: Bearer <key>.

Headers

Idempotency-Key
string
required

A unique key that makes a retry return the original result.

Required string length: 1 - 255

Body

application/json
configuration_id
string
required

ID of a published Connect configuration (ccfg_…) in the same mode as your key. The configuration sets what the merchant does (connect only, or connect and apply for live processing at your pricing), which permissions you get, and whether new or existing Accounts can use it. Copy it from Connect › Onboarding › Links in the Dashboard.

return_url
string<uri>
required

Where Ionic sends the merchant's browser when this visit ends, whether they finished or left. It can be any path and query on an origin you approved under Connect › Domains › Redirect domains, so each link can return to a different page. For example, https://yourapp.com/settings/payments/done?practice=4281.

Ionic adds account_link={id} to the query and keeps your other query values; the query may be re-encoded, so don't rely on parameter order. account_link is reserved and overwrites any value you set.

Live mode requires HTTPS and rejects loopback addresses. Test mode also accepts http://localhost:<port>, http://127.0.0.1:<port>, and http://[::1]:<port> without registering them. Fragments and user:password@ are rejected; write internationalized hostnames in punycode. Ionic checks the origin again when the merchant returns, so removing a redirect domain also stops returns to it.

configuration_revision
integer<int64>

Published revision to use. Omit it to use the configuration's current published revision. The response reports the revision used.

external_reference
string

Your own ID for this customer, 1 to 256 characters. Ionic returns it when you retrieve the link and on account_link.* events. Ionic doesn't interpret it and doesn't require it to be unique.

resume_from
string

ID of an earlier link to continue, for example after it expired or the merchant left. The merchant resumes with the same Account, Connection, and application. Send the same configuration_id and external_reference, a new Idempotency-Key, and no prefill. return_url can differ from the earlier link's.

Pattern: ^alink_[0-9A-Za-z]{24}$
prefill
object

Business and owner details as string values.

For a configuration that creates new Accounts, these fields are required, and Ionic creates the merchant's Account from them: business_name (up to 200 characters), contact_first_name, contact_last_name, contact_email (the owner verifies this address), contact_phone (such as +14155550100), address_line1, city, state, postal_code, and country (US). address_line2 is optional. A missing field returns 422 naming it.

Other fields, and any prefill for existing-Account configurations, must be listed in the configuration's allowed prefill fields. The owner names are accepted only for new-Account configurations. Don't send prefill with resume_from.

Response

The link. Save id, then redirect the browser to url.

id
string
required

Account Link ID. Save it with your customer before redirecting; the return carries it back.

Pattern: ^alink_[0-9A-Za-z]{24}$
object
enum<string>
required
Available options:
account_link
expires_at
string<date-time>
required

When url stops working, 30 minutes after creation.

configuration_id
string
required

The configuration this link uses.

configuration_revision
integer<int64>
required

The configuration revision this link uses.

url
string<uri>
required

Single-use URL for the merchant's browser. Redirect to it right away; don't email or message it.

account
string

For a new-merchant configuration, the Account Ionic created from prefill. It isn't connected to your Platform until the owner verifies their email and clicks Connect.