Skip to main content
Cancel an active or pending subscription. The behavior depends on the current subscription status.
POST /v1/actions/subscription-order/cancel-order
Authentication: API Key (owner role)

Cancellation Behavior

Current StatusActionResult Status
pendingImmediate cancelcanceled
activeCancel at period end (via PSP)canceling -> canceled at period end
  • pending: Directly canceled, status becomes canceled
  • active: PSP cancellation is triggered (takes effect at billing period end). Local status becomes canceling, then updated to canceled via Webhook when the period ends

Request Body

FieldTypeRequiredDescription
orderIdstringYesSubscription order ID (Short ID format ORD_xxx)

Example Request

const result = await client.orders.cancelSubscription({
  orderId: "ORD_2aUyqjCzEIiEcYMKj7TZtw",
});

Success Response (200) — Active Subscription

{
  "data": {
    "orderId": "ORD_2aUyqjCzEIiEcYMKj7TZtw",
    "status": "canceling"
  }
}

Success Response (200) — Pending Subscription

{
  "data": {
    "orderId": "ORD_2aUyqjCzEIiEcYMKj7TZtw",
    "status": "canceled"
  }
}

Response Fields

FieldTypeDescription
orderIdstringOrder ID (Short ID)
statusstringNew order status (canceling or canceled)

Error Responses

StatusDescription
400Missing orderId / subscription not in pending or active status
401Authentication failed
403Order does not belong to current merchant (ownership check failed)
404Order not found
502PSP error (payment provider unavailable)