Verify Stripe Checkout safely
Use Stripe test mode to validate a real purchase path without a real card.
Verify Stripe Checkout without a real credit card
You do not need a customer card to prove your launch billing path works. PreFlight's Stripe Shadow Check runs a synthetic test-mode Checkout session, verifies webhook delivery, and confirms the Supabase side effect landed — end to end.
sk_test_…). It creates a real hosted Checkout session, waits for payment completion, then polls your mapped Supabase table for the fulfillment row your webhook handler should write.
What success proves
paid in Stripe |
| Side effect | `supabase_shadow_side_effect` | Expected row exists in mapped table/column |
A passing shadow run validates the same path Payment Sync reconciles in production.
Prerequisites
<DocChecklist items={[ "Stripe connected with a test-mode secret key (sk_test_…)", "Supabase connected with service role access for verification", "One or more explicit test Price IDs saved in testPrices (or legacy priceId for a single default plan)", "verifyTableName and verifyTraceColumn mapping where your webhook writes fulfillment rows", "A publicly reachable webhook URL (or tunnel) that accepts signed Stripe events", ]} />
Recommended workflow
testPrices to an explicit JSON array of {`{ key, label, priceId, mode }`} entries. Use mode: "payment" for one-time Prices and mode: "subscription" for recurring Prices. The legacy priceId field remains a single default payment plan. Optionally set verifyTableName, verifyTraceColumn, verifyStatusColumn, verifyExpectedStatus, verifyCreatedAtColumn, and verifyWindowSeconds for async handlers.
checkoutUrl and traceId.
4242 4242 4242 4242 (any future expiry, any CVC). No real card is charged.
mode: "subscription", PreFlight creates an initial recurring Checkout, propagates the trace and plan metadata through subscription_data.metadata, and verifies the first paid session plus the same Supabase fulfillment row. Renewal, cancellation, dunning, refunds, trials, coupons, and taxes are outside this happy-path check.
Dashboard flow
- Open Revenue → Checkout test for the project.
- Ensure Stripe and Supabase integrations show connected and at least one explicit test plan is configured.
- Select a plan, then start the checkout test. The dashboard keeps the plan label, key, Price ID, mode, trace, and Checkout session attached to the run.
- Complete the hosted Checkout session in the new browser tab, or use the Stripe test card shown by the runner.
- Leave the page open or return later; PreFlight polls Stripe and verifies the database side effect automatically. Review the receipt and per-plan history when it settles.
API flow (CI and preview deploys)
Shadow endpoints are documented separately from API v1 because they are Stripe-specific:
previewUrl, priceKey, source. Omit priceKey to run the first/default configured plan. Scheduled Revenue Guard runs every configured plan automatically. Send Idempotency-Key from CI so retries reuse the same selected-plan run.
runId, traceId, checkoutSessionId.
Example start response:
{
"runId": "uuid",
"status": "running",
"traceId": "pf_trace_…",
"checkoutSessionId": "cs_test_…",
"checkoutUrl": "https://checkout.stripe.com/…",
"priceKey": "pro-monthly",
"priceLabel": "Pro monthly",
"priceId": "price_…",
"checkoutMode": "subscription"
}
PreFlight embeds preflight_trace_id in Checkout session metadata and client_reference_id so your webhook handler can write the same trace to Supabase.
Autonomous all-plan runs
Revenue Guard uses the same shadow-run orchestrator as the dashboard, but it does not choose only one plan. Each scheduled batch runs every entry in testPrices sequentially, so the existing one-active-shadow-run database guard stays safe. Each price consumes one unit from the shared synthetic-run meter and uses the same browser queue as Journey Canary. A browser or fulfillment failure for one plan is recorded with its label, trace, Price ID, and Checkout session, then the next configured plan still runs.
The dashboard lets an operator select one plan for a manual run. The history and receipt show the plan label, checkout mode, Price ID, trace ID, and session ID so a multi-plan batch is diagnosable without opening raw logs.
Mapping discovery
If the saved mapping misses during a shadow run, PreFlight attempts discovered trace-bearing tables from the connected Supabase OpenAPI schema before failing. Still, explicit mapping is recommended — discovery is a fallback, not a substitute for knowing your schema.
Common failures
sk_test_ key and the selected testPrices entry; set previewUrl to a reachable origin |
| Payment succeeds, DB fails | Webhook route or trace mapping wrong | Check handler logs for the traceId; align verifyTraceColumn |
| Verification window expires | Async side effect too slow | Increase verifyWindowSeconds or optimize webhook handler |
| Shadow start rate limited | More than 4 starts/minute per project | Use Idempotency-Key in CI to reuse existing runs |
<RelatedLinks links={[ { href: "/docs/api/shadow-stripe-flow", title: "Shadow Stripe flow API", description: "Endpoint details, fields, and idempotency." }, { href: "/docs/guides/revenue-watch", title: "Payment Sync", description: "Production reconciliation after shadow passes." }, { href: "/docs/integrations/stripe", title: "Stripe integration", description: "Webhook secrets and verify field reference." }, { href: "/docs/guides/fixing-common-failures", title: "Fixing common failures", description: "Webhook and mapping failure patterns." }, ]} />
