The Stripe account in each environment
The Sandbox test account lives on Ledger’s Stripe Connect platform, so it needs no Stripe sign-up. To use your own Stripe test mode instead, for example to see objects in your own Stripe Dashboard, choose Use a different key in Settings › Stripe and paste an
sk_test_ secret key.
Ledger accepts standard secret keys (sk_test_, sk_live_). It encrypts them, never shows them again, and checks a key with Stripe before saving it.
What Ledger creates in Stripe
Free plans and features never reach Stripe.
The webhook
Stripe tells Ledger about payments through a signed webhook. Ledger treats it as the only proof that money arrived: it grants credits from these events, never from a browser redirect. When you connect a key, Ledger creates the endpoint in that Stripe account for you, pinned to the Stripe API version Ledger is built against and subscribed to these events:
Each delivery is verified against the endpoint’s signing secret, and handling it twice changes nothing, so Stripe’s retries are safe.
Webhook health
Before it opens a paid Checkout or starts an upgrade, Ledger checks with Stripe that the endpoint exists, is enabled, points at Ledger, uses the expected API version and subscribes to the events above. If it doesn’t, the request returns502 stripe_webhook_unhealthy and no Checkout opens, because the payment couldn’t reach the customer’s balance.
Settings › Stripe shows the webhook as Receiving when it’s healthy, or Not active with a Check again button. If you deleted or edited the endpoint in Stripe, reconnecting the key creates a fresh one.
You don’t handle Stripe webhooks
Ledger consumes Stripe’s events for you. Your app reads the results from Ledger’s API: the customer’s plan, balance, subscriptions and purchases. To react to billing changes in your app, subscribe to Ledger’s own webhooks.Next steps
Billing lifecycle
How these events move a customer through billing.
Go live
Connect your live Stripe account.