billing
POST /v1/subscriptions/{subscriptionId}/close
Close a plan now; its sites go offline at once.
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}/close \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "confirm": <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
Close now (owner answer A032, ANS-032). The plan ends at once (canceled), the final period's usage is invoiced, and every site on it is suspended, so backups follow the suspended-site keep rule. No refund, unless claim_money_back is true AND the 30-day money-back guarantee applies (A260): then a Zinn® credit refund request is opened in the same transaction, and a refused refund rolls the close back. An ineligible claim is refused (422, MONEY_BACK_NOT_ELIGIBLE) before anything changes. Any PayPal agreement and NOWPayments plan is cancelled at the provider FIRST; a refused PayPal cancel refuses the close with the plan untouched. confirm must be true. Requires billing.payment.manage; another tenant's plan is 404. Audited as billing.subscription.closed.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
subscriptionId (path) | Uuid | Yes | The plan to close now. |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
confirm | boolean | Yes | Must be true; the sites on the plan go offline at once. |
claim_money_back | boolean | No | Claim the 30-day money-back guarantee as Zinn® credit. Refused when the preview's money_back.eligible is false. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | Uuid | Yes | UUIDv7 identifier — sortable by creation time. |
org_id | Uuid | Yes | UUIDv7 identifier — sortable by creation time. |
status | SubscriptionStatus | Yes | A subscription's lifecycle state. |
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 renews at current_period_end. false means the customer cancelled the plan (POST /v1/subscriptions/{subscriptionId}/cancel): it runs to the end of… |
renew_by_hand | boolean | No | true when auto-renew is off (owner answer A022: invoice me each period): the plan is kept and invoiced each period, and no stored card or agreement is charged. Set by… |
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… |
payment_method_id | Uuid | null | No | DAY-0031: the saved card the customer chose to pay this plan (set with POST /v1/subscriptions/{subscriptionId}/renewal-method); null = the account's primary card. |
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… |
included_domains_locked | object[] | No | Domains claimed free with this yearly plan whose 12-month stay is still running (P1-102). Turning renewal off or cancelling never deletes or suspends them: each keeps working and… |
sites | object | No | How many sites draw on this plan (every site holding a slot: not failed and not being removed) and the first few of their addresses, ordered by site name (P2-113), so several… |
free_months | SubscriptionFreeMonths | null | No | The free months an automatic offer (STORE3FREE, MOVEIN) put on this package, or null. A screen says the package is PAID UP until free_until, never "unpaid" or "renews for 0"… |
sites_stopped | integer | Yes | — |
refund_request_id | Uuid | null | Yes | The money-back refund request, when one was claimed. |
Errors this endpoint can return
401 · 403 · 404 · 422 · 429 · 503