This API is used to update a payment link's status and expiry date.
HTTP Method: PUT
Environment
Test Environment | <https://uatoneapi.payu.in/payment-links> |
Production Environment | <https://oneapi.payu.in/payment-links> |
Note:
The access token with the scope as update_payment_links is required on the header. For more information on getting the access token, refer to Get Token API - Payment Links.
Path parameters
Parameters | Description | Example |
---|---|---|
ID |
|
INV8446471886220 |
Request headers
Parameter | Description |
---|---|
mid mandatory | String This contains the merchant identifier. |
Authorization mandatory | Bearer String This contains the client_token. For more information, refer to Get Token API - Payment Links . |
Request parameters
Parameters | Description | Example |
---|---|---|
ID |
|
INV8446471886220 |
subAmount |
|
100.00 |
tax |
|
1.00 |
shippingCharge |
|
10.00 |
isPartialPaymentAllowed |
|
false |
active |
|
true |
expiry |
|
2024-04-01 |
udf |
|
{ |
userToken |
|
2023-04-01 |
address |
|
{ |
reminder |
|
{ |
customAttributes |
|
{ |
Sample request
curl --location --request PUT 'https://uatoneapi.payu.in/payment-links/INV1406204187' \
--header 'merchantId: 5018363' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 010c57cc96af33b84b2de81ee8c30b6f99a1976e74c2bd3fb5f4e5b535f25ae8' \
--header 'Cookie: PHPSESSID=7nv3d144qeh7g102p3uau1o6pm' \
--data '{
"active":false
}'
Sample response
Success scenario
{
"status": 0,
"message": "string",
"result": {},
"errorCode": 170,
"guid": "f529e375-739f-4c8a-b5f5-0e67fa3f533f"
}
Failure scenario
{
"status": -1,
"message": "expiry cannot be less than the current date",
"result": null,
"errorCode": null,
"guid": null
}