billing
POST /v1/subscriptions/{subscriptionId}/term
Switch a live monthly subscription to annual billing now.
Authentication
Send an API key as a bearer token. The key must carry the billing.payment.manage permission; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/subscriptions/{subscriptionId}/term \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "interval": <string<annual>> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Moves the subscription onto the SAME plan billed annually, starting now and running a year (P1-086). The charge is the annual price less the unused part of the current paid window, plus tax, taken exactly as a plan change takes it: account credit first, then a stored method. With nothing stored that can pay, the answer is 422 PAYMENT_METHOD_REQUIRED carrying the payment step for the order; pay that order (POST /v1/orders/{orderId}/pay) and repeat this request, which replays the same order and takes nothing further. Renewal settings (automatic or invoice me, the stored method) are kept. Send expected_total_minor (the figure the customer was shown): a quote that moved since is refused with nothing charged. Requires billing.payment.manage. 422 with nothing charged for every refusal GET names, plus refusal.termSwitch.notSwitchable.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
subscriptionId (path) | Uuid | Yes | The live monthly subscription to move to annual billing. |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
interval | string<annual> | Yes | — |
expected_total_minor | integer | No | The total the customer was shown; a moved quote is refused, nothing charged. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
plan_code | string | Yes | The plan this subscription is now on. |
plan_name | string | Yes | Its catalogue name, so a receipt can name it without a second lookup. |
plan_version_id | string | Yes | The priced version the new subscription carries. |
subscription_id | string | Yes | The new subscription. A plan change supersedes rather than mutates, because a subscription pins the exact version it was sold — so this id differs from the one in the request… |
order_id | string | Yes | The order the charge was raised against, or "" when the change resulted in a credit and no order was minted. |
charged_minor | integer | Yes | What was actually taken, in minor units. |
credited_minor | integer | Yes | What was actually returned as account balance, in minor units. |
pay_order_id | string | No | P1-087: when this downgrade replaced an unpaid renewal, the unpaid order at the cheaper price to pay now (POST /v1/orders/{id}/pay); "" otherwise. The subscription stays past… |
paypal_approval_url | string | No | P1-085: on a PayPal-billed subscription the change cancels the PayPal agreement FIRST (a refused cancel changes nothing: refusal.planChange.paypalNotStopped), supersedes, then… |
package_type | string | Yes | The vendor package type, read back after the move. "" on our own fleet and "" when the subscription entitles no site — there is no package to move. |
slots_before | integer | Yes | The site allowance the subscription held before the change. |
slots_after | integer | Yes | The site allowance it holds now. |
slots_before_unlimited | boolean | Yes | The old plan sold unlimited sites, so slots_before is null by design. |
slots_after_unlimited | boolean | Yes | The new plan sells unlimited sites, so slots_after is null by design. |
quote | SitePlanQuote | Yes | The quote the change was performed against. |
Errors this endpoint can return
401 · 403 · 404 · 422 · 429