Delete a Plan

The Delete Plan API helps you to delete the already created plan. However, it is recommended to use this API with care because if a plan is deleted, all the subscriptions associated with the plan will stop working automatically.

Post Method: DELETE

Path: {base_url}/api/sub/v1/merchant/subscriptions/{subscriptionId}

Header

ParameterValue
X-PayU-Subscription-SignatureSHA512 Signature generated by encrypting request parameters in the body by Merchant Key, Merchant Salt and Plan ID.
merchantIdMerchant Key received during onboarding. For example, smsplus.

X-PayU-Subscription-Signature Generation Method

signatureData = SHA512(“merchantId:" + merchantId + "|planId:" + planId + "|" + merchantSalt) 

Example

SignatureData = SHA512(merchantId:smsplus|planId:5acb64a8070c9406b0928207|abcdef) 

The above example will delete the plan ID “5acb64a8070c9406b0928207” for a merchant having the key as smsplus and salt as abcdef

HTTP Response Codes

If the plan is deleted successfully, then the HTTP method code 204 is returned to the merchant.

HTTP Status CodeDescription
204The plan is deleted successfully.
403Forbidden request.
400The request is malformed.
404Merchant not found.
422The request has invalid values.
500Interval Server Error.