Change Status or Expiry for a Payment Link API

This API is used to update a payment link's status and expiry date.

HTTP Method: PUT

Environment

πŸ“˜

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

ParametersDescriptionExample
ID
mandatory
String This parameter must contain the payment link invoice number.INV8446471886220

Request headers

ParameterDescription
mid mandatoryString This contains the merchant identifier.
Authorization mandatoryBearer String This contains the client_token. For more information, refer to Get Token API - Payment Links .

Request parameters

ParametersDescriptionExample
ID
mandatory
String This parameter must contain the payment link invoice number.INV8446471886220
subAmount
optional
String This parameter must contain the payment sub amount.100.00
tax
optional
String This parameter must contain the tax amount for the transaction.1.00
shippingCharge
optional
String This parameter must contain the shipping charge.10.00
isPartialPaymentAllowed
optional
Boolean This parameter includes whether partial payment is allowed.false
active
optional
Boolean This parameter includes whether the payment link is active.true
expiry
optional
String This parameter must contain the expiry date.2024-04-01
udf
optional
JSONThis 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"
}
userToken
optional
StringThis parameter must contain the payment link creation from date.2023-04-01
address
optional
JSONThis 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"
}
reminder
optional
JSONThis 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]
}
customAttributes
optional
JSONThis 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
}