v1

latestOpenAPI 3.1.02026-07-241120379.1 KB

Cancel subscription

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

Path parameters

subscriptionIdinteger required

The unique identifier of the subscription in Loop.

Request body

cancellationFlowIdinteger

Identifier for the cancellation flow selected by the customer or merchant. This is used to track the cancellation analytics.

commentstring

Optional text field used to capture additional notes or remarks provided by the customer during the cancellation of the subscription.

notifyCustomerboolean

Optional parameter that determines whether a cancellation email should be sent to the customer. Defaults to true if not specified.

markForCancellationboolean

Applicable only for prepaid subscriptions. If set to true, the subscription will be marked for cancellation and will cancel after all orders in the current prepaid cycle are fulfilled. If set to false, the subscription will be cancelled immediately.

Response

200

successboolean
messagestring
{"stackTrail":"paths:/2023-10/subscription/{subscriptionId}/cancel:post:responses:200:content:application/json:schema:properties:data","oasType":"schema","type":"unknown"}
codestring

Example response

{
  "success": true,
  "message": "Subscription cancelled successfully",
  "code": "SUCCESS"
}