v1

latestOpenAPI 3.0.12026-07-225791279.7 KB
Subscription Lifecycle

Cancel Subscription

This endpoint permanently cancels a subscription. Once cancelled, no further recurring charges will be attempted.

Note:

  • Cancelling a subscription is a terminal action. Once cancelled, future billing stops immediately and nextChargeDate is cleared.
patch/subscription/api/v1/subscriptions/{id}/cancel

Path parameters

idstring required

The ID of the subscription.

Request body

reasonstring required

The reason for cancelling this subscription.

Example request

{
  "reason": "Not interested"
}

Response

Request Successful

successboolean

Indicates if the request was successful.

messagestring

Descriptive message confirming the cancellation operation.

Example response

{
  "success": true,
  "message": "Subscription cancelled",
  "data": {
    "id": 22,
    "customerId": "test-trial-2",
    "customerEmail": "johndoe@gmail.com",
    "status": "CANCELLED",
    "enrollmentReference": "SUBREF_EE9A8CD25F38423B87",
    "enrollmentTxnReference": "SUB_ENROLL_22_1783543549106",
    "cancelledAt": "2026-07-08T22:07:36.154580616",
    "cancellationReason": "customer_request"
  }
}