API Command: upi_mandate_revoke
Cancel Recurring Registration API allows the merchants to cancel the UPI registration from their website. It is a mandate to implement the Cancel Recurring Registration API so that your customers can use Recurring Payments. After the registration is canceled for a customer, the merchant cannot restore it, and the customer must register a fresh mandate with the merchant (applicable for UPI).
Note:
Your customers cannot use Recurring Payments without the Cancel Recurring Registration API being implemented.
HTTP Method: POST
Environment
Test Environment | https://test.payu.in/merchant/postservice.php?form=2 |
Production Environment | https://info.payu.in/merchant/postservice.php?form=2 |
Request parameters
Variable | Description | Example |
---|---|---|
key mandatory | varchar This parameter is the unique Merchant Key provided by PayU for your merchant account. | Your Test Key |
command mandatory | varchar For initiating a recurring transaction, “upi_mandate_revoke” must be passed in this parameter. | upi_mandate_revoke |
var1 mandatory | JSON This parameter is JSON parameter and description of the fields are described in the var1 JSON Fields Description table of this section. | { “authPayuId”: “10731087875”, “requestId”: “23123abut12123osd14” } |
hash mandatory | 512 SHA hash strings generated by encrypting request parameters so that any tampering can be avoided. | a6105d0e5c8726fd37713d02ace8f63 652bfe1337f14e4a3652084ba9787e4e e601a503bcc42ba101fb1c378b910d563 7e9806b92fc89322db01806 97ff906b3 |
var1 JSON fields description
var1 parameter (JSON format) fields description:
Field | Description |
---|---|
authPayuId mandatory | This parameter must contain the mihpayid returned in the payment response of the Registration transaction when the transaction is successfully completed. As explained in Payment Consent Transaction using Merchant Hosted Checkout the section, the merchant needs to map this value against the customer profile at their end so that correct authPayuid will be passed in the request. |
requestId mandatory | This parameter must contain the unique request value generated at merchant’s end to distinguish independent request call. |
Response Parameters
Parameter Name | Description |
---|---|
status | Status defines acknowledgment from PayU. Possible values are: |
action | Always returned as “MANDATE_REVOKE” to highlight the type of action. |
message | Description of the Mandate cancellation process. |
Sample response
- Sample response for successful cancellation:
Cancelling Recurring Registration - Success Response
{
"status": 1,
"action": "MANDATE_REVOKE",
"message": "Request Initiated"
}
- Sample Response for failed cancellation
Cancelling Recurring Registration - Failure Response
{
"status": 0,
"action": "MANDATE_REVOKE",
"message": "Mandate is not active”
}