Modify card recurring payments and mandates of Visa and Mastercard using PayU APIs. Update billing rules, subscription settings, mandate details, and recurring payment configurations securely for card-based transactions.
Use this endpoint to modify recurring payments and mandates of cards of the following card networks. You can update mandate details, recurring payment configurations, billing rules, and subscription settings for active recurring transactions.
- Visa
- Mastercard
- Amex
- RuPay
RBI Guidelines:
While modifying the recurring payment, taking consent from the customer and doing an additional factor of authentication is mandatory. You must ensure this is done before using this API. You need to pass
authPayuIdandactionparameters to modify the billing details as a part of JSON using this API.
POST
/_payment
Sample Request
Request Payload
curl --location 'https://test.payu.in/_payment' \
--header 'accept: application/json' \
--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_47719' \
--data-urlencode 'amount=1.00' \
--data-urlencode 'firstname=Gaurav' \
--data-urlencode '[email protected]' \
--data-urlencode 'phone=1234567890' \
--data-urlencode 'productinfo=my_order_47719' \
--data-urlencode 'api_version=7' \
--data-urlencode 'si=3' \
--data-urlencode 'pg=CC' \
--data-urlencode 'bankcode=UTIBENCC' \
--data-urlencode 'surl=https://test.payu.in/admin/test_response' \
--data-urlencode 'furl=https://test.payu.in/admin/test_response' \
--data-urlencode 'ccnum=5123456789012346' \
--data-urlencode 'ccexpmon=05' \
--data-urlencode 'ccexpyr=2030' \
--data-urlencode 'ccvv=123' \
--data-urlencode 'ccname=Test User' \
--data-urlencode 'si_details={"action":"modify","paymentEndDate":"2030-04-13","billingAmount":"400.00","authPayuId":"999990000006391"}' \
--data-urlencode 'hash=YOUR_HASH_VALUE'Sample Response
Response Payload
Array
(
[mihpayid] => 25603951365
[mode] => CC
[status] => success
[unmappedstatus] => captured
[key] => BmTY3G
[txnid] => 5527fc7d02f2bfc00eb4
[amount] => 1.00
[cardCategory] => signature_premium
[discount] => 0.00
[net_amount_debit] => 1
[addedon] => 2025-10-14 15:44:41
[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] => YOUR_HASH_VALUE
[field1] => CBC10141015051509EGR573
[field2] => 185869
[field3] =>
[field4] =>
[field5] =>
[field6] => 05
[field7] => AUTHPOSITIVE
[field8] => 0 | Transaction Completed
[field9] => Transaction Completed
[payment_source] => payu
[meCode] => {
"wibmo_merchant_id":"16329672",
"hash_key":"YOUR_HASH_VALUE",
"acquirer_merchant_id":"175645866049780",
"mcc":"5499"
}
[PG_TYPE] => CC-PG
[bank_ref_num] => 528710004895
[bankcode] => CC
[error] => E000
[error_Message] => No Error
[cardnum] => XXXXXXXXXXXX4879
)Request Parameters
Mandatory ParametersParameters marked with * are mandatory.
Parameter | Description |
|---|---|
key* |
|
txnid* |
|
amount* |
Note: Type-cast the amount to float type Depending upon the merchant use case, this value will vary.
|
firstname* |
|
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. |
productinfo* |
|
api_version* |
|
si* |
|
pg* |
|
bankcode* |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hash* |
|
si_details JSON Parameters
Handy Tips:
- One or more fields (marked optional) in the following table must be posted to modify the subscription:
billingCyclebillingIntervalbillingAmount- If the request was to modify a subscription, si_consent_action parameter 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.
Parameter | Description |
|---|---|
action* |
|
paymentEndDate* |
Note: Make sure to pass the correct end date. Depending on the start and end date, number of payment iterations are internally calculated and same is passed to acquirers or banks. |
billingAmount* |
|
| This field is used only to modify an existing subscription/consent. You can modify the following details:
|
Response Parameters
Parameter | Description |
|---|---|
|
|
|
|
|
|
|
|
|
Refer to the Payment State Explanations. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If, in billing details, the action was to modify, then to validate whether the subscription was modified, this fields need to be validated in response. If this field is not sent in response of modify request, then even if transaction is success, then money would have got deducted but the subscription would not have been modified. |
For Network Tokens
For si=3 (Modify or Cancel Mandate), PayU supports two integration flows based on how card details are processed:
- Standard card flow
- Network token flow
Use the standard card flow when processing mandates using regular card details. Use the network token flow when the card has been tokenized and the transaction must be processed using the network token instead of the physical card number.
Handy Tips:This scenario is applicable if you are PCI compliant and got the network token and TAVV from any other aggregator or schemes and then sent the card transaction request in the form of authentication.
Additional Object to Pass
Please find below the complete request payload with the additional added.
Sample Request Payload
curl --location 'https://test.payu.in/_payment' \
--header 'accept: application/json' \
--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_47719' \
--data-urlencode 'amount=1.00' \
--data-urlencode 'firstname=Gaurav' \
--data-urlencode '[email protected]' \
--data-urlencode 'phone=1234567890' \
--data-urlencode 'productinfo=my_order_47719' \
--data-urlencode 'api_version=7' \
--data-urlencode 'si=3' \
--data-urlencode 'pg=CC' \
--data-urlencode 'bankcode=UTIBENCC' \
--data-urlencode 'surl=https://test.payu.in/admin/test_response' \
--data-urlencode 'furl=https://test.payu.in/admin/test_response' \
--data-urlencode 'storecard_token_type=1' \
--data-urlencode 'storecard_token=5200000000000000001' \
--data-urlencode 'additional_info_for_tokenized_flow={"tavv":"6726","last4digits":"1005","par":"A0009WTYMUG6ANFB3F9Z8CNYAKCX9"}' \
--data-urlencode 'ccexpmon=05' \
--data-urlencode 'ccexpyr=2030' \
--data-urlencode 'ccname=Test User' \
--data-urlencode 'si_details={"action":"modify","paymentEndDate":"2030-04-13","billingAmount":"400.00","authPayuId":"999990000006391"}' \
--data-urlencode 'hash=YOUR_HASH_VALUE'Additional Parameters
| Parameter | Description |
|---|---|
store_card_token* | string The Network token generated by you. |
storecard_token_type* | integer Indicates the store card token type. For this scenario, you must include 1. |
additional_info* | json This parameter will contain the additional information in the following JSON format: {"last4Digits": "1234", "tavv": "ABCDEFGH","trid":"1234567890", "tokenRefNo":"abcde123456"} |
additional_info Object Parameters
additional_info Object Parameters| Parameter | Description |
|---|---|
trid* | string (Token Requestor ID) is the identity given by the networks for creating the tokens. You should be able to get the same from your token provider. |
tokenRefNo* | string (Token Reference Number) is generated along with the network token. . You should be able to get the same from your token provider. |
TAVV* | string A token authentication verification value given by schemes or interchange. Also, known as cryptogram. |
Notes:
- The last 4 digits of cards is mandatory for all transactions.
- Some payment gateways require the Token Requester ID (trid) and Token Reference Number (tokenRefNo) to be passed for processing the transaction. Not passing these values will restrict the number of payment gateways available for processing the transaction.
- Token Requester ID (trid) and Token Reference Number (tokenRefNo) are mandatory for Diners token transactions.
