Start free: 1,000 credits on signup, no card needed. Then pay as you go: 1 cent per 10 credits, billed monthly.Ledger lets every signup use your product on free credits from the first minute, then converts them to monthly pay as you go the moment they add a card. Two pieces: a one-time grant of free credits at signup, and a $0 pay-as-you-go plan the customer moves to when they add a card. A customer with no plan can spend credits on credits features (Customers without a plan), so the free credits work before any plan exists.
The catalog
The calls
1. On signup, grant the free credits. A balance adjustment with no plan attached. Key it on the customer so a retried signup grants once.check answers:
Response
no_plan, ask for a card. Attach the pay-as-you-go plan. For a customer with no saved card, attach returns a Checkout URL that collects the card for a $0 total:
Rules
- Signup credits outlive the plan change. An adjustment stands apart from plan grants, so the customer keeps it when pay as you go is attached. Add
expiresAtfor credits that should lapse, such as a 30-day trial budget. - For a monthly free allowance, use a free plan. A $0 plan with
monthlyCredits: 1000and no overage gives 1,000 credits every month. Moving to pay as you go then ends the free plan, and its unspent credits expire when the payment is confirmed (Free plans). - Free credits spend on credits features. Metered, held and boolean features answer
no_planuntil a plan is attached. For metered usage, attach a free plan with a metered item at signup. - Before the plan, free credits are the limit. A use they don’t cover gets
no_planfromcheckand409 insufficient_creditsfromtrack. - Caps. Which cap applies has the plan default and each customer’s own cap.
- Grant signup credits after email verification, or keep them small, so throwaway accounts gain little.
Related
- Pay as you go: the $0 plan with overage.
- Balance adjustments: grants by hand or from code.
- Free plans: a recurring free allowance.