Skip to main content
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.
2. Check and track as usual. Each search spends 1 of the free credits. When they no longer cover a use, check answers:
Response
3. On 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:
Once Stripe confirms, the customer spends their 3 leftover free credits, then every use bills on the monthly renewal: a month of 4,200 credits of overage bills $4.20.

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 expiresAt for 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: 1000 and 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_plan until 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_plan from check and 409 insufficient_credits from track.
  • 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.