Modify the Recurring Payment for UPI

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

Environment

Request parameters

VariableDescriptionExample
key
mandatory
varchar This parameter is the unique Merchant Key provided by PayU for your merchant account.Your Test Key
command
mandatory
varchar For updating a recurring transaction, “upi_mandate_modify” must be passed in this parameter.upi_mandate_modify
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",
"amount": 1900,"
"endDate": "2021-11-15",
"requestId": "23123abut12123osd14"
}
hash
mandatory
512 SHA hash strings generated by encrypting request parameters so that any tampering can be avoided.
hash = sha512(key|command|var1|SALT)
a6105d0e5c8726fd37713d02ace8f6365
2bfe1337f14e4a3652084ba9787e4ee60
1a503bcc42ba101fb1c378b910d5637e9
806b92fc89322db01806 97ff906b3

var1 JSON fields description

var1 parameter (JSON format) fields description:

FieldDescription
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

ParameterDescriptionExample
statusReturns any of the following status of the transactions:
active –Mandate is in active state
revoked – Mandate is cancelled
pause – Mandate is paused
unpause –Mandate is un-paused
active
authpayuidThis parameter returns the consent transaction ID.700010006213657
actionThis parameter returns any of the following action of the mandate:
MANDATE_UPDATE
MANDATEPRE_DEBIT
MANDATEREVOKE
MANDATE_STATUS
 
dateTimeThis parameter returns the start date of the mandate."2020-09-16 18:18:21"
amountThis parameter returns the amount of the mandate created159.00
endDateThis parameter returns the last date of the mandate.2022-10-06 00:00:00
mandateN
umber
This parameter returns the unique mandate number (UMN) for the registration.700010006213657@mybank
hashThis parameter returns the SHA Hash string generated for the transaction.f94e3af697dc09879997ae00
40d03b612abe739f70 1b5e1a
3c4d7b5cecaddc7c446e7bb
9fc44a854727e39e63c2059
d1ba5d31defaff305a7627c7
c4b190704 4

Sample response

Success scenario

Update Recurring Registration for UPI - Success Response

{
"status": "pause",
"authpayuid": "700010006213657", "action": "MANDATE_PAUSE",
“key” : “485nghu”
“udf1" : ""
“udf2" : ""
“udf3" : ""
“udf5" : ""
“udf6" : ""
"dateTime": "2020-09-16 18:18:21",
"amount": "159.00",
"endDate": "2022-10-06 00:00:00",
"mandateNumber": "700010006213657@mybank", "hash":
"f94e3af697dc09879997ae0040d03b612abe739f701b5e1a3c4d7b5cecaddc7c446e7bb9fc44a8547 27e39e63c2059d1ba5d31defaff305a7627c7c4b1907044"
}

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"
}