Cancel subscription interface stops subscription and further processing of the associated immediately. Merchant needs to be mindful before executing this because once Cancelled, same subscription cannot be resumed.
HTTP method: DELETE
Path: {base_url}/api/sub/v1/merchant/subscriptions/
subscriptionId
Request parameters
Header
Parameter | Description |
---|---|
X-PayU-_ |
SHA512 Signature generated by encrypting request parameters in body by Merchant Key, Merchant Salt and Subscription Id. |
merchantId |
Merchant Key received during onboarding. |
Generating X-PayU-Subscription-Signature
Signature = SHA512("merchantId:" + merchantId + "|subscriptionId:" + subscriptionId + "|" + merchantSalt)
Example –
Signature = SHA512(merchantId:YQeVda|subscriptionId:5acb64a8070c9406b0928207|1v9b 1)
Where “YQeVda” is merchant key and “1v9b1” is merchant salt.
HTTP response codes
If subscription is cancelled successfully, then the HTTP method code 204 is returned to merchant as a part of API call.
HTTP Status Code | Description |
204 | Subscription deleted successfully |
403 | Forbidden request |
400 | Request is malformed |
500 | Interval Server Error |