Learn how to cancel recurring payments for AMEX and RuPay cards using PayU APIs. Follow the integration steps, request parameters, and response handling for seamless mandate cancellation.
Use this API to cancel card mandates registered via AMEX and RuPay card networks. You cannot restore a cancelled mandate. You should ask customers to register a new mandate.
Watch Out!The 2FA is required for cancelling recurring payment with AMEX and RuPay cards.
POST
/_payment
Environment
| Environment | URL |
|---|---|
| Test Environment | https://test.payu.in/_payment |
| Production Environment | https://secure.payu.in/_payment |
Sample Request
Request Payload
curl --location 'https://secure.payu.in/_payment' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: PHPSESSID=jp38t4gvop7ami1ksncksj398v; USERTXNINFO=68ed4df291d9b7.27710642; PHPSESSID=68edd726c95b4' \
--data-urlencode 'key=BmTY3G' \
--data-urlencode 'txnid=my_order_96977' \
--data-urlencode 'amount=1' \
--data-urlencode 'firstname=Payu-Admin' \
--data-urlencode '[email protected]' \
--data-urlencode 'phone=1234567890' \
--data-urlencode 'productinfo=my_order_96977' \
--data-urlencode 'api_version=1' \
--data-urlencode 'si=3' \
--data-urlencode 'pg=CC' \ # CC/DC
--data-urlencode 'bankcode=CC' \ # RUPAYCC/RUPAY
--data-urlencode 'surl=https://admin.payu.in/test_response' \
--data-urlencode 'furl=https://admin.payu.in/test_response' \
--data-urlencode 'ccnum=' \
--data-urlencode 'ccname=Test User' \
--data-urlencode 'ccexpmon=05' \
--data-urlencode 'ccexpyr=2025' \
--data-urlencode 'ccvv=123' \
--data-urlencode 'si_details={"action":"delete","authPayuId":25630224100,"siTokenRequestor":2}' \
--data-urlencode 'hash=YOUR_HASH_VALUE'Sample Response
Response Payload
Array
(
[mihpayid] => 28191285790
[mode] => DC
[status] => success
[unmappedstatus] => cancelled
[key] => BmTY3G
[txnid] => bab0b573ae32cf4677ee
[amount] => 1.00
[cardCategory] => domestic
[discount] => 0.00
[net_amount_debit] => 1
[addedon] => 2026-04-15 21:50:44
[productinfo] => Product Info
[firstname] => Payu-Admin
[lastname] =>
[address1] =>
[address2] =>
[city] =>
[state] =>
[country] =>
[zipcode] =>
[email] => [email protected]
[phone] => 1234567890
[udf1] =>
[udf2] =>
[udf3] =>
[udf4] =>
[udf5] =>
[udf6] =>
[udf7] =>
[udf8] =>
[udf9] =>
[udf10] =>
[hash] => {{hash_value}}
[field1] =>
[field2] =>
[field3] =>
[field4] =>
[field5] =>
[field6] => 05
[field7] => AUTHPOSITIVE
[field8] => SUCCESS
[field9] => Transaction is Successful
[payment_source] => payu
[meCode] => {"MID":"hdfc_89052104","TKey":"u2+JwlMyPmC+VkPEeAqBmiinElUkgQw0TeOYOjujBQOG+uVlXBphmVAzXcUgejbxdCwUSNBv72SdwUUQDcQQ4k9XZShrpgOL29fqAyY5GyPQ/iLmyWd9Z6lJeU8fnl+9ZTuz3+cy/SLSTOpLACc/anStKOaMY9DjvwEdkAZACu2wgxvwvS8ORFvQhXuJI9CRmDxAQP/CYOj469P7PFVzN8MlUaBxTt1104zOEjE4M/2Tw7w+541attHFZQgSEhQLRVB7ANgwRmV3GZR4xlgYd0DtgJcNplJAO+AWUN0VkQku/2g2vd/XFCFJFj0NrzleIzI9FXe9r6I9N/p5nf+muw=="}
[PG_TYPE] => DC-PG
[bank_ref_num] => 7762700774896643105912
[bankcode] => RUPAY
[error] => E000
[error_Message] => No Error
[cardnum] => XXXXXXXXXXXX2656
[cardhash] => This field is no longer supported in postback params.
)Request Parameters
Mandatory ParametersParameters marked with * are mandatory.
| Parameter | Description |
|---|---|
key* | varchar The unique Merchant Key provided by PayU for your merchant account. |
txnid* | varchar A unique transaction ID (or order ID). It is the order reference number generated at your end. You can use this ID to track a particular order. This ID should be unique and you can duplicate it. The parameter value can be maximum of 25 characters. |
amount* |
|
productinfo* | string A product description. The value can contain maximum of 100 characters. |
firstname* | varchar The first name of the customer. For example, Gaurav. The value can contain maximum of 60 characters. |
email* |
Note: The email is used in case of fraud detection and chargebacks. Additionally, MIS reporting is shared with few issuing banks where email and mobile number is used to keep track of users using SI transactions. |
phone* |
Note: The email is used in case of fraud detection and chargebacks. Additionally, MIS reporting is shared with few issuing banks where email and mobile number is used to keep track of users using SI transactions. |
api_version* | number The API version. You should always pass this value as 7. |
si* | number The standing instruction. You should pass the value as 3 to cancel the card mandate. |
pg* | string This parameter describes the payment category by which the transaction was completed/attempted by the customer. Possible values:
|
bankcode* | string This parameter contains the code indicating the payment option used for the transaction. Possible values:
|
ccnum* | number The credit card number used to register the mandate. |
ccname* | string The name of the CC owner. |
ccvv* | number The CVV of the CC. |
ccexpmon* | number The expiry month of the CC. |
ccexpyr* | number The expiry year of the CC. |
si_details* | json The SI mandatory details that need to be passed during registration transaction from your system to PayU. Parameters are described in the si_details Object section. |
Storecard_token* mandatory for SITokenRequestor 2 flow and tokenized flow | varchar The network token generated at your end. You should pass this parameter if you are using the stored card token to register the mandate. |
TokenFlowType* mandatory for SITokenRequestor 2 flow and tokenized flow | integer The token flow type. Pass the value as 1 if you are going for the SITokenRequestor 2 flow. |
additional_info* mandatory for tokenized flow | json The additional info json details. Refer to the additional_info Object Parameters for parameters and their description. |
token_expiry* mandatory for SITokenRequestor 2 flow and tokenized flow | varchar Determines the expiry date of the token. |
surl | string The success URL customers are redirected to if the transaction is successful. |
furl | string The failure URL customers are redirected to if the transaction is unsuccessful. |
hash* | string The calculated hash value using the following logic. SHA512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||si_details|SALT). You can use the below button to generate a hash by providing the parameter values as per the logic. |
si_details JSON Parameters
si_details JSON Parameters
Handy TipsIf the request was to modify a subscription,
si_consent_actionparameter needs to be validated in the response. The field must return values modify based on the action sent in billing details JSON. Also, the payment source returned in such cases will be payu.
Parameters and Description
Parameters marked with * are mandatory.
Mandatory Parameters
| Parameter | Description |
|---|---|
authpayuid* | This field is used to cancel an existing subscription/consent. |
action* | string This field is used to cancel an existing subscription. Pass delete as a value to modify a subscription. |
siTokenRequestor | integer The SI token requestor. Pass this parameter value as 2 if you opt for token requestor 2 flow. |
Response Parameters
| Parameter | Description |
|---|---|
mihpayid | string It is a unique reference number created for each transaction at PayU's end which is used to identify a transaction in case of a refund. |
mode | string This parameter describes the payment category by which the transaction was completed/attempted by the customer. The values are:
|
bankcode | string This parameter contains the code indicating the payment option used for the transaction. Possible values:
|
status | string The status of the transaction and must be used to map the order status. Possible values:
|
unmappedstatus | string The status of a transaction in PayU's internal database, which can include intermediate states. Possible values:
|
key | string The merchant key. |
error | string The error reason in case of the failure transaction. |
error_message | string The error message in case of the failure transaction. |
bank_ref_num | string The bank reference number generated by the bank for successful transactions. |
txnid | string The unique transaction ID value posted by the merchant during the transaction request. |
amount | floatThe transaction amount sent in the request in INR. |
cardCategory | string The card category to indicate whether it is domestic or international. |
discount | float The discount amount. |
net_amount_debit | float The net amount debited. |
addedon | datetime The date and time of the transaction. |
productinfo | string The product information sent in the request. |
firstname | string The first name of the customer. |
lastname | string The last name of the customer. |
email | string The email address of the customer. |
phone | varchar The phone number of the customer. |
hash | string The hash value generated and sent in the request. |
PG_TYPE | string Indicates the payment gateway used for the transaction. |
udf1-udf10 | string The user defined field values sent in the request. |
success_at | datetime The date and time at when the transaction was successful. |
cardnum | integer The last 4 digits of the card used for the transactions. |
issuing_bank | string The card issuing bank. |
si_consent_action | string This parameter will be returned only if a modify subscription request has been received. In other cases, this field will not be returned. Possible values:
|
