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 |
---|---|---|
IDmandatory | String This parameter must contain the payment link invoice number. | 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 |
---|---|---|
IDmandatory | String This parameter must contain the payment link invoice number. | INV8446471886220 |
subAmountoptional | String This parameter must contain the payment sub amount. | 100.00 |
taxoptional | String This parameter must contain the tax amount for the transaction. | 1.00 |
shippingChargeoptional | String This parameter must contain the shipping charge. | 10.00 |
isPartialPaymentAllowedoptional | Boolean This parameter includes whether partial payment is allowed. | false |
activeoptional | Boolean This parameter includes whether the payment link is active. | true |
expiryoptional | String This parameter must contain the expiry date. | 2024-04-01 |
udfoptional | JSON This parameter contains the following UDF parameters in a JSON format as in the example:- udf1 - udf2 - udf3 - udf4 - udf5 | { "udf1": "string", "udf2": "string", "udf3": "string", "udf4": "string", "udf5": "string" } |
userTokenoptional | String This parameter must contain the payment link creation from date. | 2023-04-01 |
addressoptional | JSON This parameter must contain the address details in a JSON format as in the example. | { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "zipCode": "string" } |
reminderoptional | JSON This parameter must contain the following reminder details in a JSON format (as in the example):- scheduledAt: The time at the which the reminder was scheduled. - channels: The channels used to send the reminder. | { "id": 0, "scheduledAt": "string", "channels": [mobile] } |
customAttributesoptional | JSON This parameter must contain the custom attributes in a JSON format as in the example. | { "customAttributeId": 0, "entityType": "string", "toolId": 0, "customAttributeName": "string", "attributeType": "string", "options": [], "checked": true, "required": true } |
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
}