Skip to main content

Request Cancel

Phase 1 of cancellation. Resolves whether the subscription can be canceled, lists eligible cancellation reasons, and may return a retention offer the caller can present to the user.

URL

POST /api/c2a/subscription/cancel/request

Request Parameters

Body: RequestCancelRequest.

NameTypeDescription
orderIdentifierstringRequired. Target subscription's order id (from List Customer Subscriptions).
cancelationMethodstring (EnSubscriptionCancelMethod)Normal (default), Immediate, EndOfPeriod.
currentStepintegerFunnel step. Default 0.
sourcestring (EnInteractionSource)Forced to C2A server-side.

Request Example

{
"orderIdentifier": "or_01J3X...",
"cancelationMethod": "Normal",
"currentStep": 0
}

Response Parameters

RequestCancelResponse.

NameTypeDescription
responseTypestring (EnSubscriptionResponseType)Processed, Presentation, or Offer. See semantics below.
offerobject (PurchaseOffer)Populated when responseType = Offer — a retention offer the user can accept instead of canceling. Pass it back to Checkout to convert.
cancellationReasonsarray (SubscriptionCancelReasonSnapshot[])Reason codes + labels to present to the user.
cancellationReasons[].codestringReason code (e.g. PRICE).
cancellationReasons[].labelstringDisplay label.
statusobject (AzotteStatus)Operation status envelope.

responseType Semantics

ValueMeaning
ProcessedSubscription is cancelable. Proceed to cancel/confirm.
PresentationShow a presentation step (info / confirmation).
OfferRetention offer generated. If user accepts, run normal checkout against offer.offerIdentifier. If they reject, call cancel/confirm.

Sample Response

{
"responseType": "Processed",
"cancellationReasons": [
{ "code": "PRICE", "label": "Too expensive" },
{ "code": "USAGE", "label": "I don't use it enough" }
],
"status": { "messageCode": "SUCCESS" }
}

Sample Codes

curl --location 'https://acme.sandbox.azotte.com/api/v1/c2a/subscription/cancel/request' \
--header 'Content-Type: application/json' \
--header 'x-tn: e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f' \
--header 'x-api-key: sk_dev_acme_sample_123456789' \
--data '{
"orderIdentifier": "or_01J3X...",
"cancelationMethod": "Normal",
"currentStep": 0
}'