Cancel Subscription

The Cancel Subscription API allows partners to cancel subscription by providing subscription id and the subscription will be cancelled immediately

Cancel the subscription

POST https://<Platform-host>/api/merchant/:merchantId/recurring-payments/cancel-subscription

Path Parameters

Name
Type
Description

merchantId

string

Merchant ID

Request Body

Name
Type
Description

subscriptionId*

string

Subscription ID

Field Name
Type
Description
Required?

subscriptionId

string

Platform system ID for the subscription

Required

subscriptionStatus

string

CANCELLED

Required

message

string

Error or success message

Required

curl --location --request GET '<API_HOST>/api/merchant/2be66e67-88a7-4e04-985d-0a1cfb0a648c/recurring-payments/recurring-payments/subscriptions/e90c1de6-4e87-4c9e-bcbc-c535d6e349ec'/cancel \
--header 'Authorization: Basic <API_KEY>'

Webhook event: SUBSCRIPTION_CANCELLED

Webhook Payload Example

{
  event_uid: '4d304a4ed5a4e338b4753ab832efd9c0',
  event: 'SUBSCRIPTION_CANCELLED',
  data: {
    subscription_id: 'a65ju',
    subscription_status: 'CANCELLED',
    success: true,
    message: 'Subscription was cancelled successfully'
  }
}

Last updated