Cancel Subscription

To cancel a subscription means to terminate the recurring payments or recurring payment link and associated services for a specific customer's subscription. The merchant can initiate this action for various reasons such as customer request, non-payment, or termination of services.

To initiate a Cancel Subscription API call, you will need to provide the required "subscriptionid" field as part of the path parameters:

subscriptionidstringThe id generated on the subscription creationYes (path parms)
signaturestringA parameter to ensure the security and authenticity of API communications. It involves generating a signature using the contents of the API request and secret keys, which is then sent along with the request.Yes


Usage of the API environment endpoints

Please make sure you use the correct endpoint based on your environment

Signature creation for Cancel Subscription

We have a signature parameter in the Cancel Subscription API to have an additional layer of security during payment processing. To generate the signature, follow the steps below:

  1. Concatenate the parameters MerchantPublicKey and SubscriptionID as a string
  2. Hash the concatenated string with the MerchantPrivateKey(API password) as a key (algorithm for hashing: SHA256)
  3. Base64 encodes the hash

Sample Request & Response

curl --request POST \
     --url \
     --header 'accept: application/json' \
     --header 'authorization: Basic YTA4N2Y0Y2EtOTg5MC00MDdiLTljMmYtNzYzMDgzNmNjMDIwOjI2ZDMxOTE3LTcxNWUtNDhhYy1iMDcyLWRhOTczODAxNmFmNQ=='
       --data-raw '{