Fix: provider calls on the deployed Worker
workerd refuses fetch with redirect: "error", so every billing provider call failed on a
deployed Worker: Stripe webhooks answered 503 after verifying, checkout and portal could not
start, RevenueCat reconciliation never succeeded. Calls now use redirect: "manual"; a redirect
is still never followed. Redeploy to get it.
Commit
- Pagar.me as a fourth provider. Off until
pagarmeis inBILLING_PROVIDERS. Pix (one period, QR and copy-and-paste code, 30-minute expiry by default), card tokenized in the browser (renewing, or one period in up to 12 installments) and boleto (renewing or one period), in BRL./api/billing/pagarmeverifies Pagar.me's RS256 signature when present and always re-reads the order or subscription by id before granting, so refunds and chargebacks revoke. It answers 200, since Pagar.me does not document which status counts as delivered (commit). Pagar.me has no recurring Pix. See Payments and the ADR-0004 amendment. Commit - In-app checkout on
/billing. With Pagar.me as the checkout provider, choosing a plan opens a dialog: billing details once (CPF or CNPJ, phone, address), then the method; a Pix screen with a countdown and status polling, a boleto screen, paying the next period ahead, and Cancel renewal. Copy in English, German, French and Brazilian Portuguese. Commit - Stripe review. The pinned
2026-09-30.endiveis current. Portal cancellations in flexible billing mode (cancel_at) now show as ending;invoice.paid,invoice.payment_failedandcheckout.session.async_payment_failedre-read the subscription;STRIPE_PAYMENT_METHOD_CONFIGURATIONpins Checkout's payment methods, for example card and boleto for BRL prices. Commit - Polar review. The pinned
2026-10is current until Polar's January 2027 cycle. A subscription payload that no longer parses (a webhook endpoint created on another API version) now answers 400 instead of being recorded and dropped. Commit - Payment settings stay secrets.
scripts/check-production-config.mjsrefusesBILLING_*,STRIPE_*,POLAR_*,PAGARME_*andREVENUECAT_*inwrangler.jsoncvars, printing names only.