Documentation menu

Setting up Stripe Connect (provider payouts)

Providers get paid for card jobs through Stripe Connect Express accounts. Stripe handles identity checks, bank details and payouts; the app opens Stripe's own onboarding form.

Use test mode (sk_test_…, pk_test_…) until you go live. Never put live keys in the repository, CI or a demo.

If you'd rather pay providers yourself (bank transfer, etc.), leave Connect off. The payout step in the app is then hidden, and providers see "Paid by the platform".

1. Turn on Connect in Stripe

  1. In the Stripe Dashboard switch to Test mode.
  2. Go to Connect → Get started and choose Platform or marketplace.
  3. Under Connect → Settings:
    • Account types: enable Express.
    • Branding: your app name, icon and brand color. Providers see these on Stripe's onboarding pages.
    • Platform profile: describe what providers do and how they get paid (Stripe asks before you can create accounts).
    • Countries: the countries your providers live in.
  4. Copy the secret key and publishable key from Developers → API keys.

2. Add the webhook endpoint for connected accounts

Payout status changes arrive as account.updated events from the providers' accounts, so this endpoint must listen to connected accounts, not your own account.

  1. Developers → Webhooks → Add endpoint.
  2. URL: https://YOUR-API-DOMAIN/api/v1/webhooks/stripe/connect
  3. Listen to: Events on Connected accounts.
  4. Events: account.updated.
  5. Save, then copy the endpoint's Signing secret (whsec_…).

3. Fill in the admin settings

Admin → Settings → Business

  • Country: new Stripe accounts are created in this country (ISO code, e.g. US, GB, ID).

Admin → Settings → Integrations → Stripe

  • Publishable key and Secret key (test keys while developing). Test connection checks the secret key.
  • Connect webhook signing secret: the whsec_… from step 2.
  • Stripe Connect payouts: on.

The app's GET /api/v1/config then reports features.payouts: true.

4. How onboarding works

  1. The provider taps Set up payouts. It is on step 5 of the application, on Earnings, and in the banner on the provider dashboard.
  2. The app calls POST /api/v1/provider/stripe/onboarding-link. The first time, the API creates the Express account with the transfers capability and saves its id on the provider. It returns a one-time Stripe link.
  3. The link opens in an in-app browser tab (Custom Tabs / SFSafariViewController).
  4. When the provider finishes, Stripe sends them to /payouts/return, a page that tells them to go back to the app.
    • If the link expired, Stripe uses /payouts/refresh/{provider}, a signed URL valid for a day, which makes a fresh link.
  5. When the app comes back to the front, it calls GET /api/v1/provider/stripe/status. That call reads the account from Stripe and saves payouts_enabled.
  6. Stripe also sends account.updated whenever the account changes, for example when verification finishes later. The webhook updates payouts_enabled the same way.

payouts_enabled is true only when Stripe says both details_submitted and payouts_enabled.

Once payouts are active, Open Stripe dashboard (POST /api/v1/provider/stripe/dashboard-link) lets providers see their balance, payouts and bank account.

Admins see each provider's payout status on the provider page: not set up, onboarding not finished, or ready.

5. Testing in test mode

  • In Stripe's test onboarding form, use the test values Stripe shows: phone 000 000 0000, SMS code 000000, test bank account and routing numbers, and 000-00-0000 for SSN in the US.
  • To send a test webhook locally, use the Stripe CLI: stripe listen --forward-connect-to localhost:8000/api/v1/webhooks/stripe/connect and put the whsec_… it prints in the Connect webhook secret setting.

Errors the app may see

Code Meaning
PAYOUTS_DISABLED (503) Connect is off or no secret key is set.
PAYOUTS_NOT_SET_UP (409) Dashboard link asked before an account exists.
PAYMENT_PROVIDER_ERROR (502) Stripe refused or didn't answer. Details are in the API log.