Subscription statuses
List customer subscriptions returns each plan the customer has had, newest first, with itsstatus:
Get a customer shows the plan the customer is on now as
currentPlan, with the same status names. canceled and incomplete_expired describe plans that have ended, so they appear in the subscriptions list.
Renewals
Stripe renews paid plans at the end of each billing period, monthly or yearly. Ledger grants the new period’s credits and metered allowances when Stripe creates the renewal invoice (invoice.created), about an hour before it charges the card, so the customer keeps working while the payment goes through.
- Allowances refresh each period: unspent ones expire at its end and the new period’s are granted. Credit packs carry over.
- Overage from the period that just ended is added to the renewal invoice, one line per rate and per metered feature. See Invoices and Stripe.
- Seats bill for the count held, in advance, at the plan’s seat price.
- Held counts and boolean features apply for as long as the plan does.
- If Stripe voids the renewal invoice, or marks it uncollectible, the grants it made end. An uncollectible renewal that’s paid later gets its grants back for the rest of the period.
- Free plans renew in Ledger, at the same time of day each month from when they started.
- Plan versions. A subscriber renews on the version they’re on. See Plan versions.
Annual plans with monthly resets
An annual plan bills once a year. WithresetInterval: "month" (the default), the year’s invoice grants the first month. Each later month is granted in full by the customer’s first check or track in it, and unused grants end with their month. A customer who is quiet for a month loses nothing, since that month’s grants would have ended with it. Months are counted the way Stripe counts them (a year starting on Jan 31 resets on Feb 28, then Mar 31), and the twelfth ends exactly on the renewal. While the renewal is past due, the customer works on the month they have; paying it grants the month they are in.
With resetInterval: "year", the whole allowance is granted once, for the year. A lifetime plan never renews, and its grants never expire.
Past due
When a renewal payment fails, Stripe marks the subscriptionpast_due (or unpaid) and retries by your Stripe settings. The customer keeps working throughout, and Ledger holds new spending to what’s been paid for:
- Grants already made stay. The customer keeps working on what’s left.
- Usage stays within what’s been paid for: a credit use past the balance answers
insufficient_credits, and a metered use past its allowancelimit_reached, until the payment lands and overage resumes. To keep overage running instead, ignore past due. - Upgrades, immediate downgrades and new annual months go ahead once the payment lands.
- The customer can cancel at the period end. The unpaid invoice stays open, and at the period end the plan ends without granting again.
Ignore past due
Keep your best customers working at full speed while Stripe retries a failed renewal. SetignorePastDue: true on a plan for everyone on it, or on one customer, and while the subscription is past_due:
- Overage keeps running, for credits and metered items, under the customer’s one overage cap, as if the plan were
active. The next invoice bills it. - Renewal grants arrive on time, when Stripe creates the renewal invoice, as for an active plan.
Response
effective is what applies now, and source says where it comes from: customer, plan or default. Read it with GET /v1/customers/ignore-past-due.
- The customer’s setting wins.
falsestops it on a plan that ignores past due, andnullfollows the plan again. - It applies in place. A plan’s
ignorePastDuecovers every version, current subscribers included, with no new version. - It covers
past_due.unpaidandpausedwork as above, and upgrades and downgrades go ahead once the payment lands. - Overage is billed to the end. If Stripe’s retries cancel the subscription, the final invoice bills the overage recorded.
Refunds and disputes
Refund and dispute payments in Stripe, and Ledger updates the customer from Stripe’s signed events. It takes back grants for a credit pack refunded in full or lost to a dispute, and for a lifetime plan refunded in full; every other refund or dispute is recorded and leaves the grants in place.Coupons
A coupon or promotion code you add in Stripe, on the subscription or on the invoice before it’s finalized, lowers what the customer pays, never what they get. A discounted invoice, even one discounted to $0, grants the plan’s full credits and allowances. Ledger still checks the plan’s line at your full price before the discount, and tax is calculated on the discounted amount. Customers can enter a promotion code themselves when you attach withallowPromotionCodes: true. A discount stays on the subscription through upgrades and downgrades, and a prorated downgrade refund is on what the customer paid. Credit overage bills under the plan’s <Plan> – overage product, so a coupon limited to the plan’s own product discounts the plan and bills usage at full price. See Discounts and promotion codes.
Rules
- Treat a status your code doesn’t know as not paid up, so new statuses stay safe.
- Discount with coupons, not Stripe customer balances or billing credits: an invoice paid from a balance grants nothing and Ledger alerts you, and attach answers
409 stripe_customer_balancefor a customer with one.