Canceling a Subscription

You can cancel a pending, active, suspended, or delinquent subscription. Subscriptions cannot be canceled within 10 minutes before or after a payment begins processing.
Follow these steps to cancel a subscription:
  1. In the endpoint path, include the subscription ID that you received when you retrieved a list of subscriptions.
  2. Send the request to the recurring billing endpoint:

    ADDITIONAL INFORMATION

    Production:
    POST https://api.cybersource.com/rbs/v1/subscriptions/{id}/cancel
    Test:
    POST https://apitest.cybersource.test.com/rbs/v1/subscriptions/{id}/cancel
  3. Check the response message to make sure that the request was successful. A 200-level HTTP response code indicates success.
    For information about response codes, see
    Transaction Response Codes
    .

REST Examples: Canceling a Subscription

Light Dark
Response to a Successful Request
123456789101112131415161718192021222324
{"_links": { "self": { "href": "/rbs/v1/subscriptions/6192115800926177701960", "method": "GET" }, "update": { "href": "/rbs/v1/subscriptions/6192115800926177701960", "method": "PATCH" }, "cancel": { "href": "/rbs/v1/subscriptions/6192115800926177701960/cancel", "method": "POST" }, "suspend": { "href": "/rbs/v1/subscriptions/6192115800926177701960/suspend", "method": "POST" } }, "id": "6192115800926177701960", "status": "ACCEPTED", "subscriptionInformation": { "code": "6192177701960Code", "status": "ACTIVE" }}
Error Response
123
{"status": "NOT_FOUND", "reason": "INVALID_DATA", "details": []}