Skip to main content

Cancel a subscription

Cancellation ends a subscription's renewals. PaymentsAI supports two timings:

  • Immediate — omit cancelAt. The subscription transitions to canceled straight away and no further renewals run.
  • Scheduled — set cancelAt to a future date-time. The subscription stays active until that point, continues to renew on schedule, and then transitions to canceled. A scheduled cancellation can be undone before cancelAt passes — see Reactivate a subscription.

PaymentsAI dispatches the subscription-canceled webhook when the cancellation applies (or subscription-churned for a terminal churn after dunning). For the concept, reason values, and "who canceled" semantics, see Subscription cancellations. For the full webhook event list, see Subscription webhooks.

Create cancelation

You can cancel only a subscription — not a one-time order. Only active subscriptions can be canceled; a paused subscription must be resumed first.

curl -i -X POST \
'https://staging-api.payments.ai/v1/public-api/organizations/:organizationId/subscription-cancellations' \
-H 'Content-Type: application/json' \
-H 'Authorization: ApiKey <keyValue>' \
-d '{
"subscriptionId": "ord_xxx",
"cancelledBy": "customer",
"reason": "did-not-use",
"cancelAt": "2026-11-03T14:45:04.536Z"
}'

READ cancelations

To get a list of subscription cancelations related to your organization:

curl -X 'GET' \
'https://staging-api.payments.ai/v1/public-api/organizations/:organizationId/subscription-cancellations' \
-H 'accept: application/json' \
-H 'Authorization: ApiKey <keyValue>'

READ cancelation by ID

To get a particular subscription cancelation:

curl -X 'GET' \
'https://staging-api.payments.ai/v1/public-api/organizations/:organizationId/subscription-cancellations/:subscriptionCancellationId' \
-H 'accept: application/json' \
-H 'Authorization: ApiKey <keyValue>'

UPDATE cancelation

To update a particular subscription cancelation:

curl -i -X PATCH \
'https://staging-api.payments.ai/v1/public-api/organizations/:organizationId/subscription-cancellations/:subscriptionCancellationId' \
-H 'Content-Type: application/json' \
-H 'Authorization: ApiKey <keyValue>' \
-d '{
"reason": "did-not-want"
}'

DELETE cancelation by ID

A cancellation can be deleted only while it is still in draft state. Once it has applied to the subscription, deleting it returns an error — undo the cancellation via Reactivate a subscription instead.

curl -X 'DELETE' \
'https://staging-api.payments.ai/v1/public-api/organizations/:organizationId/subscription-cancellations/:subscriptionCancellationId' \
-H 'accept: application/json' \
-H 'Authorization: ApiKey <keyValue>'