docs(stripe): document test-mode subscription testing (BUNYIP-175) #206
Loading…
Reference in a new issue
No description provided.
Delete branch "docs/BUNYIP-175-stripe-test-mode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Documents how to test membership subscriptions locally against Stripe test mode (BUNYIP-175). The original issue asked for a "sandbox environment"; the conclusion is that none is needed - Stripe's built-in test mode is the sandbox, and test cards only authorize against test-mode keys (rejected in live mode), so the flow cannot move real money.
Changes
dev-docs/stripe-test-mode.md(new): end-to-end walkthrough - load test-mode keys, forward webhooks withstripe listen --forward-to http://localhost:4401/v1/webhooks/stripe, map test products to tiers, drive the lifecycle, and the test-card table (4242... happy path, 4000...9995 / ...0341 / ...0002 failure paths). Includes cleanup and the verification steps that stay[needs test keys]..env.example: addSTRIPE_SECRET_KEYandSTRIPE_WEBHOOK_SECRETto the dev section (they were only in the production secrets block) with comments pointing at the test-mode flow and the two load paths (env vs admin Stripe UI /stripe_config).Webhook route confirmed (from source)
POST /v1/webhooks/stripeon port 4401 (bunyip-api/src/handlers/webhook.rs, mounted inroutes/webhook.rs:9+routes/mod.rs:24). Signature verified againstSTRIPE_WEBHOOK_SECRET, deduped onevent.id. Six event types handled (checkout.session.completed, customer.subscription.{created,updated,deleted}, invoice.payment_{succeeded,failed}).Scope
Docs and config only; no code paths change. The acceptance criteria that require a live subscribe / grace cycle / tier resolution stay gated on provisioned Stripe test-mode keys, matching the
[needs test keys]items indev-docs/billing-m1-implementation-plan.md.🤖 Generated with Claude Code