Subscription Schedules
Schedule future changes to a subscription. Each schedule moves it through phases with their own prices, quantities, and dates, and at the end releases or cancels it.
Create a Subscription Schedule
Creates a schedule. Send `customerId` and `phases` to define it with phases: it starts as `not_started` and ONVO creates its subscription when the first phase starts. Send only `fromSubscription` to create it from an existing subscription: it starts as `active`, with `endBehavior` set to `release` and one phase covering that subscription's current period.
List all Subscription Schedules
Lists the account's schedules in the key's mode, from newest to oldest.
Count Subscription Schedules
Returns how many schedules the account has in the key's mode. The response is the number, with no object wrapping it.
Retrieve a Subscription Schedule
Returns a schedule with its phases, its customer, and its subscription. A missing ID or another account's ID responds `404` with `subscription_schedules.not_found`.
Update a Subscription Schedule
Updates a schedule in `not_started` or `active` status. Send the `version` you read in `expectedVersion`: if the schedule changed since then, the response is `409` and you have to read it again before retrying. If the schedule already has a subscription, changes to `defaultDescription`, `defaultCollectionMethod`, `defaultPaymentMethodId`, and `metadata` also apply to that subscription.
Cancel a Subscription Schedule
Cancels a schedule in `not_started` or `active` status. If it is `active`, it also cancels its subscription and voids its invoices in `open` status. It takes no body.
Release a Subscription Schedule
Releases a schedule in `not_started` or `active` status. The schedule stops managing the subscription, which stays active and keeps billing its current items on its own; the response returns it as `released` with `subscriptionId` set to `null`. Releasing a `not_started` schedule ends it without creating a subscription. It takes no body.