Connect

Get Stripe connect URL

Changed on

Initiates Stripe Connect OAuth for the customer's own Stripe account, with read-only access. Stripe is a connect-only sales source: each paid charge becomes a Purchase event in GET /v1/events (source stripe), and refunds lower or retract it.

One Stripe account can be connected per profile. Connecting a different account to a profile that already has one redirects with error=stripe_profile_has_account.

Flow

  1. Redirect the user to authUrl.
  2. After authorization, Stripe returns the browser to Zernio's internal callback.
  3. Zernio redirects to redirect_url (or the dashboard when omitted).

On success the redirect carries connected=stripe, profileId, accountId and username (the Stripe account name). On failure it carries error, platform=stripe and error_message.

To match a payment to the ad campaign behind it, set zrn, gclid, fbclid or utm_* keys (and optionally landing_url) in the metadata of the Checkout Session, PaymentIntent or subscription.

get/v1/connect/stripe

Request

Query parameters

profileIdstring required

Your Zernio profile ID (get from /v1/profiles).

redirect_urlstring

Custom redirect after connection. Must be an absolute http(s) URL or custom app scheme such as myapp://callback; relative and unsafe URLs return 400.

reconnectAccountIdstring

The Stripe connection being reconnected. The callback refuses to write to any other account.

Response

OAuth authorization URL and authenticated state

authUrlstring uri required

Stripe URL to open in the user agent.

statestring required

Authenticated, expiring OAuth state handled by the callback.

Changes