How do you add card checkout to a Lovable, Bolt, Replit or v0 app when Stripe won't take your business?

Where the secret key and server routes go in each builder, the hosted-page route for apps with no server, and the webhook rule that keeps orders honest.

By
Railbed
Published
Reading time
10 min
An app window built from toy bricks on a baseplate with one brick missing, a tower crane lowering the last brick carrying a payment card into the gap, an open instruction booklet and a tub of spare bricks

Press the card to run an example sale.

Use a card checkout that doesn't run through the builder's own payment integration, and put its secret key and two small server routes where your builder runs server code. If the app has no server at all, link to a hosted checkout page or embed its buy button instead, and fulfil orders by hand.

This guide is for people who built an app in Lovable, Bolt, Replit or v0, asked the builder to "add payments", and found that every built-in option ends at a Stripe or Paddle account their business can't get. It shows where checkout code goes in each builder, according to each builder's own documentation, the no-server route and the server route, with the prompts and code from Railbed's published recipes.

Why the builder's own payment button doesn't help a refused business

Each builder's built-in payments are a guided setup for one or two named providers, and that provider's acceptance rules still apply. Lovable's documentation says its built-in payments "are currently powered by two providers: Paddle and Stripe", that "if your product is restricted under one provider's policies, Lovable will guide you to the other", and links Stripe's restricted businesses list for what each won't take (Lovable payments docs, read November 23, 2026). When both say no, there is no third option inside the guided flow.

The table shows what each builder's own docs say its payment integration needs, as of November 23, 2026.

Builder Built-in payments What it needs from you
Lovable Paddle or Stripe Paddle's seller verification and domain review, or claiming the Stripe account Lovable created (docs)
Bolt Stripe "A Stripe account (individual or business)" and a Bolt or Supabase database (docs)
Replit Stripe connector, or your own Stripe keys A paid plan for the connector, and your live Stripe account to publish (docs)
v0 Stripe through the Vercel Marketplace A Stripe account; the integration "provisions your API keys as environment variables" (Vercel docs)

Stripe's list, last updated September 22, 2026, prohibits for example adult content "designed for the purpose of sexual gratification", "any artificial-intelligence generated content that meets the above criteria", and "games of chance including gambling... sweepstakes and contests" (Stripe). If your app is one of those, read Can I use Stripe for my business? for the trade-by-trade reading. The rest of this page is about wiring in a checkout that isn't tied to that list.

Where checkout code goes in each builder

A checkout provider's secret key has to live in server code that the builder runs for you, and every builder has a different name for that place. The browser half of your app is public: Lovable's docs say anything prefixed VITE_ is "embedded into the client bundle at build time" (Lovable secrets), so a key placed there belongs to whoever opens the page.

This table is the map: where server code runs, where the key is stored, and the address your payment provider will send webhooks to.

Builder Server code runs in Secret key goes in Webhook address looks like
Lovable Server functions and API routes in apps created from May 13, 2026; edge functions in older apps (docs) Project secrets, entered through Lovable's secure form https://<project-ref>.supabase.co/functions/v1/railbed-webhook for an edge function
Bolt Server functions, "sometimes called edge functions" (docs) Secrets in the database settings, which "only work with server functions" (docs) The deployed function's address
Replit The app's own server process (Node.js or Python) The Secrets tool, read as environment variables (docs) https://<app>.replit.dev/... while building, then the deployment's address
v0 Next.js route handlers on Vercel The Vercel project's environment variables, which v0 inherits (docs) https://<deployment>/api/webhooks/railbed

Three details in these docs matter for a checkout. Replit says Secrets "are available for all deployment types except Static Deployments", so a static Replit deployment can't hold a key. v0's preview "can only access variables from the Development environment", and sensitive variables are hidden from it. And Lovable's newer apps "often run their server code inside the app instead" of edge functions, so ask Lovable which kind your project has before you paste a recipe written for the other.

Two routes to card checkout in an app builder: a hosted page with no key in the app, or a server route with a key and a webhook. The no-server route trades automatic fulfilment for zero secrets in the project.

Route 1: no server, a hosted checkout page

A hosted checkout page needs no key in your app, because the page lives on the checkout provider's domain and the app only links to it. In Railbed, a checkout page is one product at one price that any number of buyers can pay, at https://pay.railbed.io/c/your-slug. You make it in the dashboard with Create → Checkout page, then add the button to any page of your app:

<script src="https://pay.railbed.io/embed.js" async></script>

<railbed-button checkout="your-slug" label="Get Pro for $19"></railbed-button>

The button opens the checkout over your page, and the card provider opens in its own tab (no-code guide). If your builder strips script tags, a plain link to the page's address does the same job; Railbed's button code puts that link inside the element for exactly this case.

What this route gives up is the app knowing who paid. Each payment appears in Railbed's Payments and Orders, and you grant access by hand from there. A success URL can send buyers back to a thank-you page, but anyone can type that address, so the page should thank them and never hand out a download, a license key or a Pro flag. For one product sold to a few customers a week, that is a fair trade. For anything delivered automatically, use route 2.

Route 2: a server route and a signed webhook

The server route has four parts, and each builder needs all four: a server-side price list, a function that creates a checkout session, a function that receives webhooks, and a success page that only displays status. Railbed publishes a recipe for each of Lovable, Bolt, Replit and v0 at checkouts.md, listed in the docs for AI agents. In order, with what you see at each step:

  1. Get a Test key without pasting it into the chat. In Lovable and v0 the chat can't run commands on your computer, so you create the key yourself: in Railbed, turn on Test mode, open Developers, choose Create key with purpose Checkout API and Full access. Then paste it into the builder's secret form as RAILBED_SECRET_KEY. In Replit, the agent can run npx checkouts.md login --test-only --env-path .env in the Shell; you approve on a Railbed page and the key goes into the project's env file, never into the chat.

  2. Paste the recipe prompt. For Lovable it reads, with your product filled in:

    Read https://checkouts.md/recipes/lovable.md and add a Railbed checkout to this app, following it exactly.
    Sell: Pro plan for 19.00 USD.
    Keep the secret key and the webhook secret only in Edge Function secrets (RAILBED_SECRET_KEY,
    RAILBED_WEBHOOK_SECRET), never in code or in this chat. Mark an order paid only from a verified Railbed
    webhook after re-reading the payment. Test it in Railbed's Test mode before anything goes live.
    

    The Bolt, Replit and v0 recipes have the same prompt with their own storage names. The recipe has the builder add an orders table, the two functions, a Pay button and a success page.

  3. Check the checkout function. On a click, it looks up the price on the server, saves an order, and calls Railbed with the order id as the idempotency key:

    const res = await fetch('https://pay.railbed.io/v1/checkout_sessions', {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${RAILBED_SECRET_KEY}`,
        'Content-Type': 'application/json',
        'Idempotency-Key': order.id,
      },
      body: JSON.stringify({
        amount: '19.00', currency: 'USD', description: 'Pro plan',
        reference: order.id,
        success_url: `${APP_URL}/checkout/success?order={REFERENCE}`,
      }),
    });
    const { url } = await res.json(); // send the browser here
    

    The price comes from the server, so a buyer can't edit it in the browser.

  4. Add the webhook endpoint. In Railbed's Developers, choose Add endpoint with your function's address, reveal the signing secret and save it as RAILBED_WEBHOOK_SECRET. Every delivery carries a Railbed-Signature: t=…,v1=… header: an HMAC-SHA256 of the timestamp, a full stop and the raw body. Your function rejects anything more than five minutes old or unsigned (signature docs), answers 2xx within 10 seconds, and expects retries: seven attempts over about 21 hours.

  5. Check the fulfilment rule. On payment.paid, the function re-reads the payment with GET /v1/payments/:id, checks that the amount, currency and reference match the order, and marks the order paid once, keyed on the event id so a repeated delivery does nothing. A held payment is not paid.

The guide How do you verify a payment webhook signature and avoid fulfilling an order twice? goes through that handler line by line.

The four steps of a paid order in an app builder: the Pay button on your page, the checkout function, the provider's card page, and the webhook function that marks the order paid. Only the server functions ever see the secret key; the browser only ever sees a checkout address.

What breaks first in each builder

The webhook route needs the most platform-specific care, because each platform guards its server code and your payment provider is an outside caller. The fixes below come from Railbed's recipes and the platforms' own docs.

Builder Usual failure Fix
Lovable or Bolt edge functions Every webhook delivery fails with 401 Supabase edge functions require a valid JWT by default, which a webhook sender doesn't have; set verify_jwt = false for the webhook function, as Supabase documents for webhooks, and keep the signature check
Bolt npx checkouts.md login can't connect from Bolt's in-browser terminal Create the key in Railbed's dashboard and add it as a secret: the database's Secrets page in Bolt, or Supabase's Edge Function secrets
Replit Webhooks stop arriving during development The .replit.dev address changes when the Repl does; add an endpoint for the new address and delete the old one
v0 Preview deployments refuse the webhook When Vercel's Standard Protection is on, it covers every domain except production; test on an unprotected deployment, never with a bypass token in the address
All Test and Live values mixed One mode's secret key with the other mode's webhook secret makes every signature fail; replace both at go-live

Test it before anything is real

Railbed's Test mode is a separate copy of your account where no card is charged and no money moves. Only your team's browsers can pay a Test page, so first choose Turn on Test payments in this browser under API keys on Developers. Then click your app's Pay button, enter any email, and on the test provider page choose Simulate successful payment. The order should show as paid, the function logs should show one fulfilment, and the payment's timeline in Railbed should read Webhook delivered. Run it again with Simulate an underpayment: the order should show held, and nothing should be granted.

What changes for your buyers and for your money

The checkout above is card checkout for businesses that mainstream processors turn away, and it works differently from a Stripe checkout in four ways you should know before you ship it (how it works):

  • The card is entered on the provider's page. An independent, licensed on-ramp provider, such as Coinbase, Banxa or Topper, charges the card in a new tab, and that provider decides whether to ask the buyer for ID. Smart Routing ranks the providers least likely to ask first, but can't promise that one won't.
  • Sales settle to your own wallet, almost always as USDC on Polygon, not to a bank. Turning that into dollars in a bank account is your step, through an exchange or a wallet app.
  • Fees come out of what arrives: the provider's own fee and exchange rate, a 1% network fee, and Railbed's fee from 0.9%, shown in your dashboard when the payment starts. There is no setup or monthly fee, and nothing is held back from your sales.
  • Refunds and disputes work differently. There is no refund button; you send money back yourself. Settled sales can't be pulled back from your wallet; card disputes go to the provider that charged the card.

The smallest card payment is about 2.00 USD, set by the providers, so a $19 plan clears it easily.

When this fits, and when it doesn't

This route fits an app whose built-in payment flow ended at a refusal, and whose owner is fine receiving sales in a wallet: AI tools, adult apps and AI companions, game top-ups, courses and coaching. There is no underwriting and no application to pass; sign-up needs an email, your website and a payout wallet.

It doesn't fit if Stripe or Paddle will take you. Lovable's Paddle option is a merchant of record that calculates, collects and remits tax for you, which Railbed doesn't, and a bank payout is simpler than a wallet if you never wanted one. It also doesn't fit renewals that must charge a card automatically: Railbed bills subscriptions by invoice, and the customer pays each one.

Add checkout to your app from a tested recipe

Open the recipe for Lovable, Bolt, Replit or v0, then prove it with a simulated payment in Test mode before you take a real one.

See the recipesCreate an account