Cancel Plan

Cascade cancellation is synchronous and immediate

Canceling a plan cancels every subscription on it right away — there’s no way to cancel the plan without also canceling its subscribers. Check affected_subscriptions in the response to know how many were affected.

Re-canceling an already-CANCELED plan is safe and re-runs the cascade — it returns 200 again, not an error. This is deliberate: it’s the recovery path if a previous cascade partially failed to cancel some subscriptions, so retry a cancel call if you’re unsure it fully completed. INVALID_STATE (400) is reserved for a plan status outside ACTIVE/CANCELED, which isn’t currently reachable given those are the only two plan statuses.

POST/subscriptions/plans/{plan_id}/status

The only supported status transition. Canceling a plan blocks new subscriptions AND synchronously cascade-cancels every subscription currently linked to it.

Header Parameters

X-Account-Codestringrequired

The account_id found in your WHITELABEL Dashboard (UUID). Required — omitting it returns 400 BAD_REQUEST (“Invalid x-account-code header.”).

Path Parameters

plan_idstringrequired

The unique identifier of the plan.

Body application/json

status"CANCELED"required

Response

200

idstring
statusstring
affected_subscriptionsinteger

The number of subscriptions that were cascade-canceled along with the plan.

  1. Reserved for a plan status outside ACTIVE/CANCELED — not currently reachable, since those are the plan’s only two statuses today. Re-canceling an already-CANCELED plan does NOT hit this: it re-runs the cascade and returns 200.
codestring
messagesstring[]
Request
curl -X POST "https://api-sandbox.whitelabel.com/v1/subscriptions/plans/<plan_id>/status" \
  -H "Content-Type: application/json" \
  -H "X-Account-Code: <X-Account-Code>" \
  -H "public-api-key: <public-api-key>" \
  -H "private-secret-key: <private-secret-key>" \
  -d '{
  "status": "CANCELED"
}'
Response
{
  "id": "string",
  "status": "string",
  "affected_subscriptions": 0
}