API Command: upi_mandate_modify
The upi_mandate_modify API allows you to modify UPI registration from their website for their existing mandates created for their consumers. If you are not willing to use the upi_mandate_modify API, you can revoke the previous registration mandate using the upi_mandate_revoke API and create a new registration mandate for that customer.
Note:
The upi_mandate_modify API must only be used for updating the UPI registration transaction.
HTTP Method: POST
Request parameters
Variable | Description | Example |
---|---|---|
key mandatory |
| Your Test Key |
command mandatory |
| upi_mandate_modify |
var1 mandatory |
|
|
hash mandatory | 512 SHA hash strings generated by encrypting request parameters so that any tampering can be avoided. | a6105d0e5c8726fd37713d02ace8f6365 |
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 earlier in the Register a Recurring Payment 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. |
amount optional | "The new amount of the mandate which has been modified. |
endDate optional | The new end date of the mandate which has been modified. |
requestId mandatory | This parameter must contain the unique request value generated at merchant’s end to distinguish independent request call. |
Response parameters
Parameter | Description | Example |
---|---|---|
status | Returns any of the following status of the transactions:
| active |
authpayuid | This parameter returns the consent transaction ID. | 700010006213657 |
action | This parameter returns any of the following action of the mandate:
|
|
dateTime | This parameter returns the start date of the mandate. | "2020-09-16 18:18:21" |
amount | This parameter returns the amount of the mandate created | 159.00 |
endDate | This parameter returns the last date of the mandate. | 2022-10-06 00:00:00 |
mandateNumber | This parameter returns the unique mandate number (UMN) for the registration. | 700010006213657@mybank |
hash | This parameter returns the SHA Hash string generated for the transaction. | f94e3af697dc09879997ae00 |
Sample response
Success scenario
- Update Recurring Registration for UPI - Success Response
{
"status": 1,
"action": "MANDATE_UPDATE",
"message": "Mandate modify request processed successfully"
}
- Update pending
{
"status": 1,
"action": "MANDATE_UPDATE",
"message": "Mandate update pending at PG. Please wait for webhook or use upi_mandate_status service to confirm updated status"
}
It will be an async call to customer for approving the mandate modification in their PSP app by entering their MPIN. After the UPI mandate is modified, you can check the UPI mandate status, or can consume the UPI mandate modification webhooks from PayU end. For checking UPI mandate status, refer to Get Mandate Status API.
Note:
UPI Mandate Modify is only applicable for the UPI Collect registration transactions. It does not works for the mandates created using the UPI Intent mode.
Failure scenarios
- Invalid data
{
"status":0,
"action": " MANDATE_UPDATE ",
"message": "Invalid Data "
}
- authPayuid is missing
{
"status":0,
"action": " MANDATE_UPDATE ",
"message": "authPayuId is mandatory "
}
- requestId is missing
{
"status":0,
"action": " MANDATE_UPDATE ",
"message": "requestId is mandatory"
}
- Amount or endDate needs to be updated or no updated values in the transaction
{
"status":0,
"action": " MANDATE_UPDATE ",
"message": "amount or endDate required to update"
}