stripe pack needs: Set up Stripe.
Users who would rather paste a restricted key need no app either:
Stripe OAuth.
Install the CLI
stripe login pairs
the CLI with one account. Pick the verified account that will own the app.The first command that touches an app asks the account to accept the Stripe
Apps Agreement, and prints the Dashboard link to do it.Generate the app
Declare OAuth and the permissions
403 coded more_permissions_required_for_application. Grant what the
pack’s tools need, from
Stripe’s permissions reference:plan_read and plan_write, not price_*.No command sets the redirect URLs. Add them to stripe-app.yaml, under
declarations:https. A test-mode
install may come back to http://localhost, which is how a script on your
machine catches the code. Remove it before you submit the app for review:
Stripe’s publishing guide
lists a localhost or placeholder redirect URL among the common reasons an app
is turned back.Upload it
--force, the CLI stops at a check that calls an app with no page
“no functionality yet”. Here the permissions are the function.Upload from the account’s test mode. If the CLI answers “You’re in live mode”,
stripe switch context moves it out.Turn on external testing
Point the flow at the test link
client_id is the app’s client ID. Its path, up to authorize, is
the consent endpoint until you publish. After that it’s the one in
STRIPE_APPS, the constant on Stripe’s provider page.sk_test_ key, and a live one with its sk_live_ key.Install it from another account
flow.authorize() built. Stripe says the app is a test version
and that installing it into test mode won’t affect the live account. Click
Continue, choose an account other than the one that owns the app, and
approve the permissions.The callback receives code and state, and Stripe adds stripe_user_id: the
account that installed. Exchange the code as on
Getting the grant. The access token begins rk_test_, and
the refresh token rolls on every use. From here the per-user client is the one
in the Stripe provider page.scripts/live_oauth_check.py
runs this step from a terminal against your app, then checks the result: the
pack’s read tools, a refresh, and two workers taking turns on one grant.Publish it
Until Stripe approves the app, only the accounts that open its External test link can connect, 25 at most. Publishing opens it to every Stripe account, through the endpointSTRIPE_APPS already declares. Before approval that
public link answers “The provided OAuth link is invalid”.
Stripe’s publishing guide
has the full list. For an app like this one it comes to:
- An activated account. Stripe needs your business details first, and publishes one app per account.
- Your real callback. Replace the
localhostredirect with yourhttpsone, raiseversioninstripe-app.yaml, upload, and set that version as the one to publish. - An icon.
iconinstripe-app.yaml, the same square image as the listing’s logo, at least 300 by 300 pixels. - The listing. A name of 35 characters or fewer that avoids “Stripe”, “app”, “Generator”, “free” and “paid”; a subtitle; up to three feature images that show no real customer data; pricing; a privacy policy; and one or two support channels.
- What the reviewers need. Testing steps, and credentials for test accounts they can sign in to without two-factor authentication. The install URL you submit must use the public link from the app’s Settings tab, not the External test link.
STRIPE_APPS_TEST and build the flow on
STRIPE_APPS as declared. A live-mode install is exchanged with the owner’s
sk_live_ key. To check the published link end to end, with the address your
browser lands on pasted back in:
When it does not work
Verify your business to get started with external testing
Verify your business to get started with external testing
Public apps uploaded from a sandbox account must set sandbox_install_compatible to true
Public apps uploaded from a sandbox account must set sandbox_install_compatible to true
App id already taken
App id already taken
id in stripe-app.yaml and upload again.The provided OAuth link is invalid
The provided OAuth link is invalid
/oauth/v2/authorize, before the app is
published. Until Stripe approves it, connect through the External test
link.Installed from the Dashboard, and no code arrived
Installed from the Dashboard, and no code arrived
403 on every call: does not have access to account
403 on every call: does not have access to account
403 more_permissions_required_for_application
403 more_permissions_required_for_application
version in stripe-app.yaml, upload, and set the new version under
External testing.invalid_grant: Refresh token does not exist
invalid_grant: Refresh token does not exist
on_refresh, then have the user connect again.Related
- Stripe OAuth — the server constant, the per-user client, and a pasted restricted key beside OAuth
- Getting the grant — the two routes,
stateand PKCE, inside your app - Stripe — the pack, form encoding, idempotency and Connect