Before you start
- Your integration works end to end in Sandbox, including a Checkout paid with a test card.
- You’ve tested the scenarios below with simulated time.
- Your Stripe account is activated for live payments.
- Your app has
httpspages for Checkout to return to.
1. Connect your live Stripe account
Open the Sandbox menu at the top of the sidebar and choose Go to production, or open the last step of Get started. Each step acts on Live while the dashboard stays in Sandbox.- Connect Stripe. Choose Connect Stripe, sign in to Stripe and pick the account your customers will pay into. Ledger never holds your key, and Stripe delivers that account’s events to Ledger.
- Or paste a key. Choose Use a secret key instead and paste a live secret key (
sk_live_…) from Stripe’s API keys page. Ledger checks the key with Stripe, encrypts it, and creates a signed webhook endpoint in your account. If Stripe refuses the key, the step says so; create a new one and paste it. - The Stripe webhook is receiving. The step is done once Stripe can deliver to Ledger; choose Check again to recheck. Ledger grants nothing a payment hasn’t confirmed through this webhook. Stripe lists the events.
2. Put your catalog in Live
- Copy plans. Choose Copy plans. Ledger lists what it will add, update and archive in Live, then publishes your Sandbox plans, features and credit packs to Live with every field (billing intervals, seat prices, tiers and overage terms included) and syncs each paid plan to your live Stripe account. Anything in Live that isn’t in Sandbox is archived.
- Every paid plan is synced. The step is done once Live has something to sell, a paid plan or a credit pack, and every paid plan is synced. Credit packs are priced at Checkout, so they need no sync.
3. Create a Live key and go to production
- Create a production key. Choose Create key. The key starts with
ledger_live_, has every permission, and is shown once: put it in your secret manager. Once Live is on, you can create keys with fewer permissions in Settings › API keys (API keys). - Go to production. Choose Go to production. Ledger checks each step again and Live appears in the dashboard.
4. Finish in Live
With the dashboard on Live:- Checkout redirects. In Settings › Checkout, set your production app’s
httpssuccess and cancel URLs. Paidattachcalls return there, unless a call sends its ownsuccessUrl. - Tax. You’re responsible for sales tax, VAT and GST. To have Stripe calculate and collect it, set up Stripe Tax in your live Stripe account, then turn on Automatic tax in Settings › Tax. See Tax.
- Ledger webhook endpoint. If your app reacts to billing changes, add a Live endpoint in Settings › Webhooks and store its signing secret. Live events go to Live endpoints. See Webhooks.
- Swap the key. Point your production backend at the
ledger_live_key. Nothing else in your integration changes.
5. Check your backend
- Refusals are handled. Every
checkthat answersallowed: falseshows the customer something useful, byreason:no_plan,feature_not_in_plan,limit_reached,insufficient_credits,overage_cap_reached. Everytrackhandles the same codes as a409, andrequest_id_conflict. Check and track has the list. - Each track has a stable
request_id. It comes from the action itself (a message ID, a job ID), so a retry can’t charge twice. - Fail open is what you want. The SDKs allow
checkand queuetrackwhen Ledger can’t answer. Keep that for cheap actions; reserve before expensive ones, or turn it off withfailOpen: false. See Fail open. - The key stays on your server. No browser or mobile app calls Ledger.
6. Take a real payment
- Buy your cheapest plan or pack with a real card.
- Check that the plan and its balances arrive on the customer.
- Refund it in Stripe. A refunded pack’s unused credits expire; a refunded subscription keeps its credits; a fully refunded lifetime plan ends.
Scenarios worth testing
In Sandbox, simulate time to run each of these before you go live:Turn off Live
To stop taking new payments, choose Turn off Live in Settings › Workspace. New Checkouts and upgrades are refused, and so is a downgrade that bills overage now (overageOnPlanChange: "bill_now" with overage to bill), each with 503 live_charges_disabled. Other downgrades and cancellations go through, and existing subscriptions keep renewing in Stripe. Ledger can also suspend a workspace that breaks its terms; email support@integrateledger.com to resolve it.
Troubleshooting
An agent can read where setup stands with
GET /v1/setup.
Rules
- Live goes to production once it has a paid plan or a credit pack to sell. Add one in Sandbox and copy plans again.
- Checkout success and cancel URLs in Live use
httpsand a public host, notlocalhost. - Until Live has Checkout redirects, a paid
attachwithout its ownsuccessUrlreturns400 checkout_urls_not_configured. - Stripe deletes a test clock 30 days after it’s created.