Contract 4d1e0ad · updated 2026-11-11
Lissen Ticketing
GuidesStripe Connect

Onboarding

Attaching the Stripe account your money lands on, by hosted onboarding or by attaching one you already have

Before you can sell anything, your organizer needs a Stripe account attached to it. This page is how that happens, and what it means afterwards.

You are the merchant of record

Every charge the engine creates is a direct charge on your own Stripe account. That is not an implementation detail — it decides who the buyer's bank statement names and whose problem a chargeback is:

  • Charges, refunds and disputes live on your balance.
  • Your account pays its own processing and dispute fees.
  • Stripe's checkout carries your branding and statement descriptor.
  • You get full Stripe Dashboard access to the account, and Stripe collects the verification requirements from you directly.
  • Lissen's cut arrives as an application fee on each charge, resolved from your fee schedules.

Lissen never becomes the merchant, and never holds your money on the way through. The trade-off is that you are the party Stripe underwrites and verifies — which is exactly why onboarding cannot be skipped.

The responsibilities bundle above is fixed engine-wide at the moment the account is created and cannot be varied per organizer. A deal with different economics is a fee schedule, not a different Stripe configuration.

Two entrances, one destination

There are exactly two ways to end up attached, and they both write the same thing: your organizer's psp_account_ref.

Hosted onboardingAttach your existing account
Use it whenYou have no Stripe account, or want a clean one for ticketingYou already sell on Stripe and want the money in the same place
Entry pointPOST/v1/connect/onboardingPOST/v1/connect/oauth/authorization
Who creates the accountWe do, then Stripe onboards youYou already did
Test organizersYes — this is the sandbox pathYes, with a Stripe test-mode account (see below)

Two restrictions apply before you pick:

  • One Stripe account belongs to exactly one organizer. Attaching an account another tenant already owns is refused with connect_account_already_linked, and it will stay refused: money attributable to two tenants is worse than money not yet attributable at all.
  • An account already controlled by another platform cannot be attached. Stripe will not hand it over, and there is no way around that from our side. If your existing account is under another platform's control, hosted onboarding is your only route — that is not a preference, it is the mandatory fallback.

Hosted onboarding

One call creates the account if the organizer has none, and returns a fresh single-use Stripe onboarding link to send your finance contact to.

curl -X POST https://tickets.lissen.com/api/v1/connect/onboarding \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
  -H "Content-Type: application/json" \
  -d '{
    "return_url": "https://acme.example/settings/payouts?done=1",
    "refresh_url": "https://acme.example/settings/payouts",
    "email": "finance@acme.example"
  }'
{
  "url": "https://connect.stripe.com/setup/c/acct_1QxAcmeTestAccount/…",
  "expires_at": "2026-11-14T18:32:00Z",
  "psp_account_ref": "acct_1QxAcmeTestAccount"
}
  • url is single-use and short-lived. Redirect the human to it; do not store it, email it, or hand it out twice.
  • expires_at is when that link dies, not when onboarding must be finished.
  • psp_account_ref is the account now linked to your organizer. It is stable; the link is not.
  • All three body fields are optional. Omit return_url / refresh_url and Stripe returns the human to a plain Lissen landing page that says "you can close this window".

The first call does two things; later calls do one. On the first call, if your organizer has no account, one is created and linked, and organizer.payment_account_attached is emitted. Once an account is linked, calling again simply reuses it and creates a fresh link — no second account, no second activity. Calling again is safe and is the intended way to get a new link when one expires.

Duplicate suppression before the first link is handled by a Stripe-side idempotency key that lasts 24 hours. Two calls a second apart cannot create two accounts; two calls more than 24 hours apart, both landing before either linked, theoretically could. In practice the first one links, and every call after that reuses the linked account.

Linked is not the same as ready to sell

Three different states, and /v1/organizer only tells you about the first:

StateHow you know
Linked — an account exists and belongs to this organizerpsp_account_ref is set on GET/v1/organizer, and status is active
Onboarding complete — the human finished Stripe's formsStripe's Dashboard for that account
Ready to sell — Stripe has enabled chargesStripe's Dashboard for that account

/v1/organizer is the authority on linkage and on whether the organizer is frozen. It is not a readiness check: an account can be linked for days before Stripe has finished verifying it.

curl https://tickets.lissen.com/api/v1/organizer \
  -H "Authorization: Bearer tk_test_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7"

Attaching an account you already have

A test organizer attaches a Stripe test-mode account. The authorized account's mode must match the organizer's: a live account offered to a test organizer, or a test account to a live one, fails at the callback with 400 connect_oauth_failed and is released. The engine can switch OAuth attach off for test organizers; while it is off, the attempt answers 422 connect_oauth_not_available and hosted onboarding is the sandbox path.

An account you already have usually takes charges already. The engine reads it at the callback and records it as ready (organizer.payment_account_ready) together with the attach, without waiting for Stripe's next account.updated. If Stripe cannot be asked, nothing is attached, the authorization is released, and the callback answers 503 connect_provider_unavailable: connect again.

1. Get an authorization URL

curl -X POST https://tickets.lissen.com/api/v1/connect/oauth/authorization \
  -H "Authorization: Bearer tk_live_..." \
  -H "Ticketing-Organizer: org_0199c4e2-1f7a-7c31-8d44-2b9f6a1e05c7" \
  -H "Content-Type: application/json" \
  -d '{
    "return_url": "https://acme.example/settings/payouts",
    "email": "finance@acme.example"
  }'
{
  "url": "https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_…&scope=read_write&state=…",
  "expires_at": "2026-11-14T19:02:00Z"
}

expires_at is the expiry of the signed state inside the URL: one hour. After that, request a new one.

Authorization URLs minted before this release stop working at the callback because the signed state TTL is one hour; start the flow again to receive a new URL.

Dashboard users can start the same flow from the Payments page: an organizer owner or a Lissen staff member can choose Attach an existing Stripe account and the engine sends them to Stripe. The signed state records that principal, and the callback checks that the API key is still granted, the owner is still listed, or the staff email is still in the staff-domain policy before it accepts the account.

2. The callback

your app                  Stripe                     the engine
   |                        |                             |
   |  redirect to url ----> |                             |
   |                        |  human approves             |
   |                        | --- GET /connect/oauth/callback?code=…&state=…
   |                        |                             |
   |                        |         checks the state, exchanges the code
   |                        |         with Stripe, then links the account
   |                        |                             |
   | <---------------------- redirect to your return_url?connect=attached ----

The engine hosts that callback itself, at /connect/oauth/callback. You never call it, and you must not try to: its authority is the signed state, and it carries no API key.

Before any Stripe grant is accepted, the engine checks — in this order — that the state verifies, that it was issued for this deployment and this exact callback URL, that the organizer it names still exists and matches its mode, that the principal which started the flow is still authorized, and that the organizer's linkage is still exactly what it was when the URL was issued.

Only then is the code exchanged with Stripe. The exchange happens before the account is written to your organizer, which is why a failure after it needs cleaning up — see below.

3. Where the human lands

Only two outcomes redirect to your return_url. Everything else stops at the callback and renders an error response there. Do not build a UI that assumes the buyer always comes back to you.

OutcomeWhat the human sees
AttachedRedirect to …/payouts?connect=attached
Declined on Stripe's consent screenRedirect to …/payouts?connect=declined
State missing, altered, expired, or for another deployment400 connect_state_invalid, at the callback
The API key that started the flow lost its grant403 organizer_not_granted, at the callback
The owner was removed or the staff domain policy changed400 connect_state_invalid, at the callback
An attach already landed for this organizer409 connect_oauth_state_consumed, at the callback
Stripe returned no code, or Stripe deterministically rejected the exchange400 connect_oauth_failed, at the callback
The authorized account's mode does not match the organizer400 connect_oauth_failed, at the callback
The account belongs to another organizer422 connect_account_already_linked, at the callback
Stripe was unavailable, rate-limited, or the exchange outcome was unknown503 connect_provider_unavailable, at the callback

A failure caused by our own platform credentials rather than by you or by Stripe returns 500 internal_error. That one is ours to fix — send us the request_id.

Without a return_url, a success or a decline gets a plain Lissen page telling the human they can close the window. Either way, treat ?connect=attached as a hint to refresh, not as proof: read /v1/organizer and check psp_account_ref.

Things that are deliberately strict

  • A completed attach kills every outstanding authorization URL. The signed state carries a snapshot of your organizer's linkage as it stood when the URL was issued, so the moment any attach lands, every other in-flight URL for that organizer stops working. Replaying a completed authorization answers 409 connect_oauth_state_consumed — even when the second attempt names the same account the first one attached.

    Note the precise shape: it is a completed attach that invalidates a state, not merely using it. A decline, or a failure before the attach, leaves the state usable until it expires on its own.

  • Mode must agree. A live Stripe account can only attach to a live organizer, and a test account to a test organizer.

  • A failure after the exchange triggers a cleanup we cannot guarantee. If something goes wrong once Stripe has already granted access, the engine tries to hand that access straight back. If that call also fails, you may be left seeing Lissen connected in your Stripe settings while the engine has no record of it. It is logged on our side, but if you see that state, tell us — it needs a human. The one deliberate exception is a replay naming the account already attached to your organizer: that is rejected without any cleanup, because handing it back would sever a link that is legitimately working.

After you are attached

Your fee is resolved per position, from your organizer's fee schedule in the position's currency, and lands on the charge as Stripe's application fee. Lissen sets that schedule at organizer scope as part of your agreement; you read it but cannot write it, and there is no item or event scope today. Two rules override the schedule: a zero-priced position is free of both fees, and there is no zero-fee fallback for a missing schedule. Before you sell in a new currency, ask Lissen to set a schedule for it and quote a cart to confirm. See Fee schedules.

A disconnection freezes you. If the account is disconnected from Lissen — from your Stripe Dashboard, or by us — Stripe notifies the engine, and once that notification is processed the engine records organizer.payment_account_deauthorized and sets your organizer's status to frozen. New sales stop at that point. This is not punishment: a disconnected account cannot take money, so continuing to sell against it would be selling something we cannot charge for.

The linkage reference is deliberately kept when you are frozen: charges that already happened still need reconciling, and refunds and disputes on them still have to land somewhere. Reattaching is a conversation with us, not a PATCH.

What is not your concern

  • Webhook plumbing. You do not register anything with Stripe, you do not verify a signature, and you do not need an endpoint. The engine runs its own Connect endpoint and does the reconciliation.
  • Which Stripe API version we are on, or how the account object is shaped. Everything you need is on /v1/organizer.
  • Refunding the application fee. We execute the application-fee refund on your behalf when a refund is created through Lissen — only the application that created a charge can refund its fee. See refunds and disputes.

What emits on the activity stream

  • organizer.payment_account_attached — an account was linked to your organizer. Emitted by either entrance, including the first hosted onboarding call that creates the account. A later onboarding call that only creates a fresh link emits nothing, because nothing changed. A linked account may not take charges yet: its onboarding may be unfinished.
  • organizer.payment_account_ready — Stripe says your linked account can take charges, usually once its onboarding is finished. Emitted once per linked account, from Stripe's account update; wait for it before relying on the account to charge.
  • organizer.payment_account_deauthorized — the account was disconnected and the organizer is now frozen.

Stable error codes

CodeStatusTypeWhat it meansWhat to do
connect_account_not_onboardable422invalid_request_errorHosted onboarding cannot be started for this organizer in its current state.Talk to us — this usually means the account is already attached.
connect_account_already_linked422invalid_request_errorThat Stripe account is already attached to another organizer.One account belongs to exactly one organizer. Use a different account.
connect_oauth_not_available422invalid_request_errorOAuth attach is switched off for test organizers in this engine, so a sandbox tenant is given an account created inside our own sandbox instead.Use hosted onboarding for a test organizer while OAuth attach is off.
connect_state_invalid400invalid_request_errorThe OAuth `state` did not verify. It is bound to the organizer, its mode, the redirect URI, the initiating key and the linkage as it stood when the URL was minted, so any attach anywhere invalidates every outstanding state.Start the authorization again to mint a fresh URL.
connect_oauth_failed400invalid_request_errorStripe refused the authorization code exchange.Start the authorization again.
connect_oauth_state_consumed409invalid_request_errorThat authorization has already been completed. A state is spent exactly once — including when the second attempt names the account the first one linked.Nothing: the account is attached. Read `/v1/organizer` to confirm.
connect_provider_unavailable503api_errorStripe was unreachable or rate-limited us.Retry with backoff.
organizer_not_granted403authentication_errorThe key is valid but holds no grant on the organizer named in the header.Use a key granted on that organizer, or ask Lissen to add the grant.

connect_provider_unavailable is the one to build a retry around — it means Stripe was unreachable or rate-limited us, not that anything about your account is wrong. The rest are deterministic: retrying them unchanged produces the same answer.

Gotchas

  • Do not cache an onboarding url. It is single-use. Call the endpoint again for a fresh one; that is free and creates no second account.
  • Do not treat psp_account_ref as "ready to sell". See the three states above.
  • ?connect=attached is a UI hint, not an authority. Confirm with /v1/organizer, and handle the case where the human never comes back at all.
  • A test organizer attaches a test-mode account only. A live account is refused at the callback.
  • These two Connect POSTs deliberately take no Idempotency-Key. Durable resource-creation POSTs elsewhere in the API require one; the quote preview also does not take one. Do not generalise in either direction from these three exceptions.

On this page