← Dashboard · Trust Center · Compliance · Pricing · Privacy · Terms
Do this once per environment (test vs live). Customers click Subscribe in the dashboard; Stripe calls your Worker webhook to attach subscription state to the tenant ID.
trust-engine:
npx wrangler d1 migrations apply consent-metadata --remoteUse your database name from
wrangler.jsonc if different.
price_…). Match it to your public tier (e.g. Builder $19).
trust-engine:
npx wrangler secret put STRIPE_SECRET_KEY npx wrangler secret put STRIPE_WEBHOOK_SECRET npx wrangler secret put STRIPE_PRICE_IDOr run
scripts\set-stripe-secrets.ps1 (interactive). Non-interactive: set $env:STRIPE_* then scripts\push-stripe-secrets-from-env.ps1. Test keys sk_test_; live sk_live_.
STRIPE_PRICE_ID is stored as a secret so it isn’t exposed to the browser. Redeploy after changing secrets.
https://YOUR_DOMAIN/webhooks/stripe (e.g. https://capchacloud.com/webhooks/stripe).checkout.session.completed,
customer.subscription.updated,
customer.subscription.deleted.whsec_…) and set it as STRIPE_WEBHOOK_SECRET.
npx wrangler deploy
stripe login stripe listen --forward-to http://127.0.0.1:8787/webhooks/stripeCopy the CLI webhook signing secret into
.dev.vars as STRIPE_WEBHOOK_SECRET while developing.
Verify: sign in → Trust & billing → Subscribe → complete Checkout → billing status should become active after webhook delivery (refresh).