Public: anyone can read this; the crew can change it.
Stripe is connected by pasting one key: checkout and the customer portal run over fetch, with nothing to set up in Stripe's dashboard #11136
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Why. The lowest barrier: the owner pastes a key and can sell. Zero dependencies:
fetchand Web Crypto only.What.
src/billing/stripe.ts, thestripeprovider of the Billing seam.src/core/secret_store.ts). Ask_test_/rk_test_key shows the word sandbox beside the provider on every admin billing view; a live key shows live.POST /v1/webhook_endpoints, url<forge>/hooks/stripe, events:checkout.session.completed,customer.subscription.updated,customer.subscription.deleted,invoice.paid,invoice.payment_failed) and seals the returned signing secret. Disconnect removes the endpoint. A key without that permission is told so in plain words, with a field to paste a signing secret instead.checkout:POST /v1/checkout/sessions,mode=subscription, one line item with inlineprice_data(currency=usd,unit_amountfrom the plan,recurring[interval]=month,product_data[name]= the plan's name),client_reference_id= the order id,metadata[order],metadata[plan], the same two undersubscription_data[metadata],customer_email,success_url,cancel_url,allow_promotion_codes=true. No Product or Price is created by hand.portal:POST /v1/billing_portal/sessionswith the stored customer.reconcile:GET /v1/subscriptions/{id};active/trialing→ active,past_due→ grace,canceled/unpaid/incomplete_expired→ none.Authorization: Bearer,application/x-www-form-urlencodedwith bracketed nested keys, a pinnedStripe-Versionheader (one constant), anIdempotency-Keyon every POST derived from the order id.api.stripe.comis a declared vendor the forge process may call (docs/CLOUD.md,mayUse); nothing else is opened.Acceptance. Tests run against a fake
fetchand assert the exact form bodies and headers; no network in tests. The key never appears in a log, an error, argv or a page.docs/PROFIT.mdsays how to connect Stripe in five lines.