The short answer

Use either the Replit Stripe connector or your own Stripe keys in each environment, never both. Test with Stripe’s test cards, connect live payments for the published app, and mark orders as paid from Stripe’s confirmation, not from the browser reaching a success page.

Why it happens

What’s actually going on

Replit supports two methods. With the Replit Stripe connector (paid plans), Agent sets up a Stripe sandbox and you connect your live account later. With your own keys, stored in Secrets, you manage the Stripe SDK and webhook endpoints yourself. Replit’s docs say to use one method per environment: combining them causes connection conflicts.

You can use different methods in different environments, such as the connector’s sandbox in development and your own live keys in production. Live payments then depend on the production setup being complete.

Already done for you

What Replit already handles

Stripe connector

Agent creates a Stripe sandbox with no keys to copy; you connect your live account from the Publish pane.

Your own keys

Keys in Secrets, with full control over the SDK and webhooks.

Agent-built flows

Checkout, deposits, balances and refund rules built from a prompt, with a test checklist.

Fix it yourself

Step by step

In this order. Most apps get most of the way with these alone.

  1. Pick one method per environment

    Connector or your own keys, never both in the same environment.

  2. Start from sign-in and a database

    Every order or booking should store its payment status against a user.

  3. Test with Stripe’s test cards

    4242 4242 4242 4242 for success and 4000 0000 0000 0002 for a decline. Test cancellations and refunds too.

  4. Connect live payments

    Connect your live Stripe account from the Publish pane (connector), or add live keys to the published app’s secrets (your own keys).

  5. Make one real purchase

    A low-cost real payment with your own card before you share the app.

Where it still goes wrong

  • With your own keys, the webhook endpoints are yours to build and secure. Verify Stripe’s signatures on every event.
  • Refunds, taxes and failed renewals are business rules you need to decide and build.
  • Mark an order paid from Stripe’s confirmation (a webhook or a server-side check), not from the browser landing on a success page.

When to bring in a developer

If the steps above turn up more than you have time for, or the app already has paying users, I take Replit apps to production: login and access rules, database and backups, payments, security, SEO and deployment.

App rescue: From $1,000, fixed price, scoped in writing before any work starts.

More in app rescue, or hire a Replit developer.

Questions

Common questions

Do I need a paid Replit plan for Stripe?

The Replit Stripe connector is on paid plans. Your own Stripe keys in Secrets are the alternative.

Why do payments fail only on the published app?

Usually production configuration: live keys or the connector aren’t set up for production, or the published app is missing a secret.

Which test cards should I use?

4242 4242 4242 4242 with any future expiry and any 3-digit CVC for success, and 4000 0000 0000 0002 to test a decline.

Want your Replit app production-ready?

Send me the app and what’s worrying you. You get a written scope with a fixed price before any work starts.

Book a 30-minute call