Skip to main content
Going live takes four steps in the dashboard and a key swap in your backend, with no review to wait for: live charges start as soon as you finish. Live has its own keys, catalog, customers and Stripe account, so Sandbox stays exactly as you left it. Work through this list in order.

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 https pages 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.
To publish Live from your catalog file instead, for example from CI after a merge, push with a Live key:

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 https success and cancel URLs. Paid attach calls return there, unless a call sends its own successUrl.
  • 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 check that answers allowed: false shows the customer something useful, by reason: no_plan, feature_not_in_plan, limit_reached, insufficient_credits, overage_cap_reached. Every track handles the same codes as a 409, and request_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 check and queue track when Ledger can’t answer. Keep that for cheap actions; reserve before expensive ones, or turn it off with failOpen: 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.
Live runs everything Sandbox does, with real time in place of simulated time. Coupons work in both; Sandbox lists every difference.

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 https and a public host, not localhost.
  • Until Live has Checkout redirects, a paid attach without its own successUrl returns 400 checkout_urls_not_configured.
  • Stripe deletes a test clock 30 days after it’s created.