This is the customer-token call path of the same endpoint described in Cancel Subscription (Merchant API Key) . Behavior, request body, and response shape are identical — only the auth surface and the call site differ.
POST /v1/actions/subscription-order/cancel-order
Authentication: Session Token — see Customer Endpoints (customer or buyer role)
The orderId must belong to the customer that the session token was minted for. Tokens minted for one buyer cannot cancel another buyer’s subscription.
Cancellation Behavior
Current Status Action Result Status pendingImmediate cancel canceledactiveCancel at period end (via PSP) canceling → canceled at period end
Request Body
Field Type Required Description orderIdstring Yes Subscription order ID (Short ID format ORD_xxx)
Example Request
TypeScript (SDK)
TypeScript (Manual)
cURL
wget
import { WaffoPancake } from "@waffo/pancake-ts" ;
const client = new WaffoPancake ({
sessionToken: window . WAFFO_SESSION_TOKEN , // injected by the merchant's portal
environment: "prod" ,
});
const result = await client . orders . cancelSubscription ({
orderId: "ORD_2aUyqjCzEIiEcYMKj7TZtw" ,
});
console . log ( result . orderId ); // "ORD_2aUyqjCzEIiEcYMKj7TZtw"
console . log ( result . status ); // "canceling" or "canceled"
Success Response (200)
{
"data" : {
"orderId" : "ORD_2aUyqjCzEIiEcYMKj7TZtw" ,
"status" : "canceling"
}
}
Response Fields
Field Type Description orderIdstring Order ID (Short ID) statusstring New order status (canceling or canceled)
Errors
Retry policy: Never retry 4xx — fix the request and resubmit. Retry 5xx with exponential backoff (start 5s, max 3 attempts).
Status errors[0].messageWhat it means Recommended handling 400 Missing required field: orderIdorderId was not provided in the bodyFix the body, resubmit 400 Expected format: ORD_xxx, got "..."orderId Short ID could not be decodedFix the orderId format, resubmit 400 Subscription cannot be canceled, current status: XOrder status is not pending or active (e.g. already canceled, canceling, expired) The subscription is no longer cancellable 401 Authentication failedSession token invalid, expired, or malformed Re-mint the session token via Issue Session Token 403 Order does not belong to userThe token’s buyer is not the order owner Mint a token for the correct buyer 404 Order not foundOrder does not exist Verify the order ID 500 Internal server errorUnexpected server-side failure Retry with exponential backoff (start 5s, max 3 attempts) 502 Failed to cancel subscriptionLocal update or PSP cancellation failed Retry with exponential backoff (start 5s, max 3 attempts)