Ask the build agent
Tell the coding agent what you want, for example “add a Pro plan at $9/month”, “sell this as a one-time purchase”, or “let customers manage their subscription”. The agent creates the products and prices in code, wires Stripe Checkout, mounts the webhook handler, and tests the flow with a test card before handing it back. Everything the agent adds is ordinary Stripe code you can read and change.Server side
The Stripe SDK needs its host pointed at pre.dev. That is the only difference from any Stripe app.lookup_key and creating it only when missing. There is no Stripe dashboard to click through while in test mode.
Browser side
Stripe Checkout needs no browser code beyond sending the user tosession.url. One rule: the pre.dev preview runs your app inside an iframe, and Stripe Checkout refuses to render inside a frame, so open it in a new tab when framed:
stripeAccount, Elements cannot find your account.
Activation on a new workspace
The first time a workspace uses payments, pre.dev creates its test account. Stripe usually activates it in under a minute, occasionally a few. Until then a charge attempt returns HTTP 503 with codepayments_account_activating and a Retry-After header. Nothing is misconfigured; retry shortly.
Test cards
Payments run in Stripe test mode while you build. Use card number4242 4242 4242 4242 with any future expiry, any CVC, and any postal code. Stripe’s other test cards work too, including the ones that decline.
Keep the key server side
STRIPE_SECRET_KEY can create refunds and read customers. Call Stripe from a server route, never from the browser. The publishable key and account id are safe to ship to the client.
