Cancel the buyer's own membership
Requires the X-Customer-Session header. The enterprise service API key is OPTIONAL: with a key, the workspace is the one pinned to it (any workspaceId in the body is ignored); without a key, workspaceId is REQUIRED in the body (422 if missing). The membership is ALWAYS resolved from the buyer session (a CustomerMembership id is never accepted). It first cancels the recurring charge at the provider and then marks the membership as CANCELLED. Idempotent.
/customer/subscriptions/cancelAuthorizationAPI key · headerrequiredAPI key prefixed with Bearer . Alternative: the x-api-key header with the raw key. Available scopes: read and write (see /.well-known/oauth-protected-resource).
x-api-keyAPI key · headerrequiredRaw API key (without Bearer ), alternative to Authorization.
X-Workspace-IdstringActive workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).
application/jsonworkspaceIdstringRequired only without an enterprise service API key: which membership (by workspace) to cancel. Ignored with a key — the workspace is the one pinned to it.
OK
dataCustomerSubscriptionCancelResultrequiredShow propertiesHide properties
idstringrequiredstatusstringrequiredPENDINGACTIVEEXPIREDCANCELLEDPAUSEDcancelledAtstring | nullrequiredShow propertiesHide properties
stringnullMissing or invalid credential.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsanyInsufficient role or resource not accessible.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsanyOperation error.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsanyOperation error.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsanyThe external provider failed to complete the operation.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsany
