billing
POST /v1/subscriptions/{subscriptionId}/auto-renew
Turn a subscription's renewal on or off.
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}/auto-renew \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "auto_renew": <boolean> }'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
The customer's renewal switch, and the only one there is. With auto_renew false the subscription runs to the end of the period already paid for and is then expired by the rebill sweep — nothing is minted, no card is charged, and the entitlements lapse at the same instant the period does. It is not an immediate cancellation: every day already bought is kept. With it true the subscription is selected by the nightly sweep at current_period_end, an order is minted and the payment method is charged. The switch is reversible right up to that moment, which is the customer's way back after turning it off. For a compute server the machine follows on its own: the provider's own renewal flag is pinned to "hold" for the life of every machine and is never exposed, so an unrenewed contract keeps serving for 24 hours, is powered down, and is deleted six days after that. Zinn® issues each vendor renewal explicitly, after the money is captured. Find a server's subscription with subscription_id on GET /v1/compute/servers/{serverId}/renewal. The response is the subscription as the database now holds it, not an echo of the request. Requires billing.payment.manage — the authority to decide what this account is charged. It deliberately does not require sites.view: a subscription is not a site, and this endpoint governs every plan, including ones that own no site. 404 for a subscription in another tenant as well as for one that does not exist — a 403 would confirm that an id belongs to somebody. 422 when the subscription has already ended (canceled/expired): writing true to a row the sweep can never select again would tell the customer they were covered when nothing will charge or serve them.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
subscriptionId (path) | Uuid | Yes | The subscription whose renewal is being changed. |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
auto_renew | boolean | Yes | true to charge again at current_period_end; false to run to the end of the paid period and then expire. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | Uuid | Yes | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Yes | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | SubscriptionStatus | Yes | A subscription's lifecycle state (docs/05 §1). |
plan | SubscriptionPlanRef | Yes | The pinned plan version a subscription was sold (a purchase-time snapshot). |
kind | string<plan, item> | No | What this subscription pays for. plan is a hosting (or other) plan; item bills one machine or managed database bought on its own order line. ⚖️… |
price | MoneyAmount | Yes | The captured price the subscriber pays (minor units + code, §2.8). |
interval | string<monthly, annual> | Yes | — |
entitlements | object | Yes | The resolved entitlements captured at purchase (feature/quota map). |
current_period_start | string | Yes | — |
current_period_end | string | Yes | — |
auto_renew | boolean | Yes | Whether this subscription charges again at current_period_end. false does not mean it has ended: it runs to the end of the period already paid for and is then expired.… |
billing_rail | string<engine, paypal> | No | Which clock decides when this subscription is charged (W41-G, ADR 0029). engine is the default and is what ADR 0011 describes: the engine decides money is due, mints an… |
started_at | string | Yes | — |
canceled_at | object | No | — |
created_at | string | Yes | — |
updated_at | string | No | — |
periods_owed | integer | No | How many whole billing periods must still be paid before this subscription may resume — every missed period and the current one (W43-107, owner ruling 2026-09-15). 0 when it… |
arrears | SubscriptionArrears | null | No | What is still owed and what the last payment covered; null when nothing is owed. |
comped | boolean | No | true when staff have comped this subscription indefinitely: it bills nothing, so there is nothing to renew or pay in advance… |
Errors this endpoint can return
401 · 403 · 404 · 422 · 429