Billing
Start Stripe Checkout (top-up)
Begin a Stripe Checkout session for a one-off top-up.
POST
Top-up amount in cents. Range:
100 (5,000).Redirect the user’s browser here. They’ll come back to
/app/billing?session=success after completing or
?session=cancel on cancellation.Stripe session id (
cs_test_… or cs_live_…). Mostly for debugging.Webhook flow
Stripe sendscheckout.session.completed to our webhook endpoint
(POST /v1/billing/stripe/webhook) when the user completes payment. The
webhook handler:
- Verifies the Stripe signature
- Reads the user_id from session metadata
- Inserts a
stripe_topupledger entry - Sends a confirmation email
Returning to the dashboard
The Stripe Checkoutsuccess_url and cancel_url are set server-side to:
?session= and shows a success toast or cancellation
nudge. Override these URLs via dashboard env vars at the deployment level.