LedgerBee Developer
  • Getting started
  • Conventions
  • Products
  • API Reference
Subscriptions
    OverviewAssign a subscriptionData modelLifecycle & statusesBilling & cadenceProrationChange flowsParent & childWebhooks
Products & Pricing
Billing documents
WebhooksMCP (AI agents)
Customer Portal
Subscriptions

Change flows

A subscription changes through a set of flows. Today most are queued from the UI — the LedgerBee operator app and the customer portal — and the public API reads and cancels queued changes but does not create them. The exception is cancellation, which has a public endpoint. (A public "queue a change" API is planned.)

FlowWhat it doesActivatesWhere today
Replace planSwaps the plan; settles any overlapat the next billing boundaryUI
Direction changeSwitches advance ⇄ arrearsnext boundaryUI
Cadence changeSwitches among the plan's alternative cadencesnext boundary (doesn't stack)UI
Products editChanges the product set / quantities → new segmentnext boundaryUI
Pause / resumeSuspends billing, then resumesimmediately / on resume dateUI
Cancel / churnEnds the subscriptionper strategy (below)Public API + UI

Each flow appends a version or segment. A plan replacement or products edit re-bills the affected partial period and carries its own prorationBehavior to settle it. A queued, not-yet-active flow is a scheduled change you can read or cancel over the API (below).

Cancel

POST /v1/subscriptions/cancel is the one change flow with a public endpoint:

TerminalCode
curl -X POST https://api.ledgerbee.com/api/v1/subscriptions/cancel \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": "0190…", "strategy": "end_of_cycle" }'
StrategyEffect
end_of_cycleCancels at the end of the current billing period.
immediatelyCancels now; optionally set refundBehavior (below).
specific_dateCancels on effectiveDate (required for this strategy).
clear_scheduleRemoves a previously scheduled cancellation, leaving it running.

An immediate cancel can issue a refund via refundBehavior:

refundBehaviorBehavior
noneNo refund is issued.
last_invoiceRefund the full amount of the last paid invoice.
proratedRefund the prorated amount for unused time since the last invoice.

A scheduled cancellation (end_of_cycle / specific_date) is itself a queued change — clear it before it activates with clear_schedule or via scheduled-changes below.

Read or cancel a queued change

A queued plan replacement, products edit, direction change, or future cancellation is a scheduled change that hasn't activated. List them:

TerminalCode
curl https://api.ledgerbee.com/api/v1/subscriptions/{id}/scheduled-changes \ -H "x-api-key: YOUR_API_KEY"
Code
[ { "changeId": "0190…", "kind": "replace_plan", "effectiveDate": "2026-07-01", "planId": "0190…", "subscriptionName": "Pro" } ]

kind is one of replace_plan, edit_products, change_direction, or churn. Cancel one by its changeId (DELETE …/scheduled-changes/{changeId}); the rest of the subscription is unaffected and the response is the current state.

changeId is ephemeral — valid only until the change activates or is cancelled. Always re-list rather than caching it.

Last modified on June 14, 2026
ProrationParent & child
On this page
  • Cancel
  • Read or cancel a queued change
JSON