aauth_…) is a short-lived request that asks an
existing Ionic merchant to grant your platform access. Your server creates it
and redirects the merchant’s browser to the returned authorization_url. After
the merchant approves or denies, Ionic redirects to your redirect_uri with
the original state and either a one-time code or an error. Your server
exchanges the code for the merchant’s mer_… ID and the permissions it
granted. For the full flow, see Connect an existing merchant.
This flow connects an existing account; it does not create one. To bring a
business that is new to Ionic onto your platform, use an
Account Link. The returned ID identifies a
connected account. Both requests use your
platform secret key without Ionic-Account.
Attributes
When you start an authorization
string
Unique identifier for the authorization (
aauth_…).string
Authorization status. A newly created authorization is
pending until the account holder approves it.string
Browser URL to open for the Account holder.
array of strings
Permissions your platform requested from the account holder.
string
ISO 8601 date-time when the authorization expires if it has not been approved.
When you exchange the code
string
Authorization status. An exchanged authorization is
approved.string
Ionic Account ID to use with supported Platform API calls.
array of strings
Permissions granted by the connected Account.
Endpoints
Statuses
Rules
- Create a random, single-use
stateand a PKCE verifier for each attempt.code_challengeis the base64url-encoded SHA-256 digest of the verifier, without padding, andcode_challenge_methodisS256. Keep the verifier on your server. - Verify that
statematches the pending attempt before accepting a result. If the merchant denies access, do not exchange a code. redirect_urimust be a redirect domain you added under Connect → Domains followed by/connect/callback, with no query string or fragment. Redirect domains are separate from payment domains.- The exchange takes the callback
code, the originalcode_verifier, and the exactredirect_urifrom the start request. A code is single-use. - Requested permissions must be allowed by your Platform Program. They do not expand your API key’s permissions.
- The exchange delivers an already-approved result. It does not create or expand access, and it does not return a new API key.
- Send an
Idempotency-Keyon both requests. When retrying, preserve the key and body. See Idempotency. - Approval connects the merchant; it does not activate their payment capability.
Read the connected account to check
payments_enabledbefore offering payment features.

