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.
- Create a Stripe App with the Stripe CLI (
stripe apps create). - In the app manifest, declare the
permissionsyour app needs — these, not OAuth scopes, define what the resulting tokens can do. Token responses always report the fixed scopestripe_apps. - Add your callback URL(s) to the comma-separated
redirect_urisvalue in the app manifest; the live-moderedirect_urimust use HTTPS, and anyredirect_urisent on the install link must match one of them exactly. - 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 uniquestatevalue for CSRF protection). - 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.
- After a user installs the app, exchange the authorization code (one-time use, valid 5 minutes) at
POST https://api.stripe.com/v1/oauth/tokenwithgrant_type=authorization_code, authenticated with that secret key. - Store the
refresh_tokensecurely and persiststripe_user_id(acct_…), the installing account.
Operational notes
Section titled “Operational notes”- 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).
Connect it to Publicus
Section titled “Connect it to Publicus”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.