billing

POST /v1/subscriptions/{subscriptionId}/close

Close a plan now; its sites go offline at once.

All billing endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

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

NameTypeRequiredWhat it is
subscriptionId (path)UuidYesThe plan to close now.

Request body

NameTypeRequiredWhat it is
confirmbooleanYesMust be true; the sites on the plan go offline at once.
claim_money_backbooleanNoClaim the 30-day money-back guarantee as Zinn® credit. Refused when the preview's money_back.eligible is false.

Response

NameTypeRequiredWhat it is
idUuidYesUUIDv7 identifier — sortable by creation time.
org_idUuidYesUUIDv7 identifier — sortable by creation time.
statusSubscriptionStatusYesA subscription's lifecycle state.
planSubscriptionPlanRefYesThe pinned plan version a subscription was sold (a purchase-time snapshot).
kindstring<plan, item>NoWhat this subscription pays for. plan is a hosting (or other) plan; item bills one machine or managed database bought on its own order line. ⚖️…
priceMoneyAmountYesThe captured price the subscriber pays (minor units + code, §2.8).
intervalstring<monthly, annual>Yes—
entitlementsobjectYesThe resolved entitlements captured at purchase (feature/quota map).
current_period_startstringYes—
current_period_endstringYes—
auto_renewbooleanYesWhether 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_handbooleanNotrue 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_railstring<engine, paypal>NoWhich 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_idUuid | nullNoDAY-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_atstringYes—
canceled_atobjectNo—
created_atstringYes—
updated_atstringNo—
periods_owedintegerNoHow 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…
arrearsSubscriptionArrears | nullNoWhat is still owed and what the last payment covered; null when nothing is owed.
compedbooleanNotrue when staff have comped this subscription indefinitely: it bills nothing, so there is nothing to renew or pay in advance…
included_domains_lockedobject[]NoDomains 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…
sitesobjectNoHow 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_monthsSubscriptionFreeMonths | nullNoThe 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_stoppedintegerYes—
refund_request_idUuid | nullYesThe money-back refund request, when one was claimed.

Errors this endpoint can return

401 · 403 · 404 · 422 · 429 · 503