Answers to common Stripe questions: choosing a connection method, naming your secret key, sandbox errors, business verification, and the live payments app.
Should I connect Stripe through Replit or use my own keys?
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.
What should I name the secret for a manual Stripe setup?
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.
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.
Stripe blocks my sandbox claim or says I have too many sandboxes. What should I do?
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.