Skip to content
Docs

Setting up Stripe Apps OAuth 2.0

This guide is part of the Publicus connection catalog. Once you have the credentials, connect the service and Publicus stores them for you.

Distilled from Stripe’s own documentation: Use OAuth 2.0 for Stripe Apps and the app manifest reference. Retrieved 2026-07-03.

> Marketplace apps only. This flow exists for Stripe Apps distributed through the Stripe App Marketplace. Public install links only work once the app is published (Stripe’s app review team can install through the link during review). It is not a general-purpose OAuth surface — for direct account access use an API key; for connecting Standard accounts see the Connect OAuth guide.

  1. Create a Stripe App with the Stripe CLI (stripe apps create).
  2. In the app manifest, declare the permissions your app needs — these, not OAuth scopes, define what the resulting tokens can do. Token responses always report the fixed scope stripe_apps.
  3. Add your callback URL(s) to the comma-separated redirect_uris value in the app manifest; the live-mode redirect_uri must use HTTPS, and any redirect_uri sent on the install link must match one of them exactly.
  4. Upload the app and find your OAuth install links: Stripe generates separate live- and test-mode links, shown on the app’s External test tab in the Dashboard. The links point at https://marketplace.stripe.com/oauth/v2/authorize?client_id=…&redirect_uri=…&state=… (add a unique state value for CSRF protection).
  5. Have the app developer account’s secret API key ready, matched to the link type (live key for the live link, test key for the test link, managed-sandbox key for a sandbox link) — it is the HTTP Basic username on every token request; there is no separate OAuth client secret.
  6. After a user installs the app, exchange the authorization code (one-time use, valid 5 minutes) at POST https://api.stripe.com/v1/oauth/token with grant_type=authorization_code, authenticated with that secret key.
  7. Store the refresh_token securely and persist stripe_user_id (acct_…), the installing account.
  • Access tokens expire in 1 hour; refresh tokens in 1 year and are rolled on every exchange — the previous refresh token expires, so always persist the newest one. Refresh via the same token endpoint with grant_type=refresh_token.
  • A permissions error on refresh usually means the request was authenticated with a refresh/access/restricted key instead of the developer account’s secret key.
  • Verify a token the way Stripe documents: call the API with the access token in place of an API key, e.g. curl https://api.stripe.com/v1/customers -u "<ACCESS_TOKEN>" (requires customer read permission in the manifest).

Open Connections under Credentials, choose Stripe, and pick Stripe Apps OAuth 2.0 (marketplace app installs). Publicus asks for exactly the fields listed above and keeps them in your workspace’s secret storage.

See also: Stripe in the catalog.

This guide is maintained by Publicus and published under CC BY 4.0.