Skip to main content
These answers cover connecting Stripe to your app. For both setup methods, see Accept payments with Stripe. For connector details, see Stripe Payments.
You can connect Stripe in two ways:
  • Replit Stripe connector: Agent sets up a Stripe sandbox, and you install the Stripe app to go live. The connector is available on paid plans.
  • Your own keys, with a webhook or the Stripe SDK: a manual setup that you manage in Secrets.
Use only one method in each environment. Combining them in the same environment causes connection conflicts, even if Agent suggests adding a webhook. You can use different methods in development and production, such as the connector while you build and your own keys after you publish.See Choose one method per environment.
Name your Stripe secret key STRIPE_SECRET_KEY in Secrets. This applies to both webhook and Stripe SDK setups. Use your own key as the value, and keep it out of your application code.Open Tools, select Secrets under Setup, then select New Secret. Enter STRIPE_SECRET_KEY in Key and your Stripe key in Value.
Secrets navigation and the new-secret form with STRIPE_SECRET_KEY entered in Key

The example shows the required name before entering a value.

Make sure your published app’s secrets include STRIPE_SECRET_KEY too, and publish again after you change it. If development uses the Replit Stripe connector’s sandbox and production uses your own keys, the published value must be a live key that starts with sk_live_ or rk_live_. Otherwise publishing stops with Connect a live Stripe account before publishing.See Publish with your own live keys.
Match the action to the error:
  • The sandbox is already in use: create a new sandbox instead of claiming that one.
  • You reached the sandbox limit: consolidate the sandboxes you already have in Stripe, then try again.
If you see an invalid or expired claim token error, contact Replit Support.
Business verification happens in Stripe’s portal. Replit keeps the step open until you confirm it:
  1. Finish business verification in Stripe.
  2. Return to Replit and select Got It to continue setup.
Completing verification in Stripe alone doesn’t move you past the step.
The installation flow can select the sandbox version of the payments app automatically, which causes an error. To fix it:
  1. In the Stripe installation flow, manually choose the Live Mode version of the app.
  2. Install it with your live Stripe account, not a sandbox or test account.
  3. Keep the Stripe window open until the installation finishes.
See Go live.

Still need help?

If your Stripe question isn’t answered here, contact Replit Support.