Cancel subscription

Changed on

This endpoint allows you to cancel an active or paused subscription, stopping all future billing and deliveries permanently or until reactivated by the customer or merchant.

post/2023-10/subscription/{subscriptionId}/cancel

Request

  • Base URL
    https://api.loopsubscriptions.com/storefront
  • URL
    https://api.loopsubscriptions.com/storefront/2023-10/subscription/{subscriptionId}/cancel
  • Auth
    API key in header Authorization

Path parameters

subscriptionIdinteger required

The unique identifier of the subscription in Loop.

Request body

cancellationFlowIdinteger required

The unique identifier of the cancellation flow.

cancellationOfferIdstring

The unique identifier of the cancellation offer.

commentstring

Optional key used to capture a message provided by the customer when canceling a subscription. Useful for collecting feedback or reasons for cancellation.

Response

200

successboolean
messagestring
codestring
pageInfounknown

Example response

{
  "success": true,
  "message": "Subscription cancelled successfully",
  "data": {
    "id": 801000,
    "shopifyId": 3760324761,
    "status": "CANCELLED",
    "totalLineItemDiscountedPrice": 90,
    "currencyCode": "USD"
  },
  "code": "SUCCESS"
}

Changes

    • breaking

      the request property became required

    • breaking

      the response's property type changed from no type to object for status

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      api operation id cancel-subscription removed and replaced with cancel

    • info

      added the new optional request property

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property to the response with the status