Skip to main content
Everything the API can set about Stripe is set by pnpm --filter api stripe:catalog: the products, the prices, their tax behaviour, the product tax code and the customer portal. What is left lives only in the Stripe dashboard. This page is the checklist for it and the order to switch from a sandbox to live mode. How billing behaves once it runs is on Billing. Choose the tax mode first: selling through Stripe Managed Payments removes every tax registration from the steps below. Managed Payments also decides what the billing wall can draw, see Checkout.

Dashboard settings

Set every row in every sandbox and again in live mode. The catalog script prints the same list when it finishes. Under Managed Payments the catalog script prints a different list; follow the script’s output instead of this table.

Going live

1

Choose who collects the tax

Under Managed Payments, Stripe is the merchant of record and nothing needs registering. Otherwise add the Stripe Tax registrations in the dashboard, Poland, OSS for the EU and any US state past its nexus threshold, and keep STRIPE_TAX_ENABLED at false until they exist.
2

Activate Managed Payments

Only for Managed Payments. In live mode open Settings, Managed Payments, activate it and accept its terms. Stripe reviews eligibility first; wait for the approval before switching the variable on.
3

Provision live mode

Run pnpm --filter api stripe:catalog with the live secret key in STRIPE_SECRET_KEY, the production WEB_PUBLIC_URL and STRIPE_MANAGED_PAYMENTS set as production will run, then read the checklist it prints for that mode, after the four lookup keys with their price ids and the portal configuration id.
4

Set the dashboard

Set every row of the table above in live mode, or under Managed Payments every item of the checklist the catalog script printed.
5

Create the live endpoint

Register https://app.asobeast.com/api/backend/billing/webhook with the ten handled events on the pinned API version, and copy its signing secret.
6

Switch the keys

Replace STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET on the host, remove the four STRIPE_PRICE_* variables, set either STRIPE_MANAGED_PAYMENTS=true or STRIPE_TAX_ENABLED to what the first step allows, never both, and redeploy. The boot log reports four prices resolved from lookup keys and no longer warns about a sandbox key.
7

Send a test event

Send one test event from the endpoint’s page. It names no subscription, so the stored event settles as ignored.
8

Buy once with a real card

Buy Indie monthly on a throwaway workspace, confirm the plan card shows Indie, then cancel in the portal and refund the charge from the dashboard. Under Managed Payments, check that the receipt says sold through Link and that the tax line matches the billing country.
9

Rotate the sandbox keys

Rotate every sandbox key that was ever pasted anywhere outside the host.
10

Retire the old sandbox endpoint

Delete the sandbox endpoint that pointed at production, so the old sandbox can serve a staging stack or be deleted.

Rolling back

Put the sandbox keys and the sandbox webhook secret back on the host and redeploy, then delete the live endpoint so Stripe stops posting live events to an instance that cannot verify them. A workspace that paid in live mode in the meantime keeps its subscription at Stripe; refund it from the dashboard and reconcile the workspace from support once live mode returns.

Billing

The catalog, checkout, the webhook endpoint and reconciliation.

Billing incident

What to do when an event fails or a customer lands on the wrong side.
Last modified on November 20, 2026