post https://test.payu.in/merchant/postservice.php
API Command: expire_invoice
The Expire Invoice API (expire_invoice) is used to expire an invoice link corresponding to the txnID. In few cases, an invoice might be sent to an incorrect email ID by the merchant. In such scenario, you can discard that invoice by expiring it.
Environment
Test Environment | https://test.payu.in/merchant/postservice?form=2 |
Production Environment | https://info.payu.in/merchant/postservice?form=2 |
Sample request
curl --location -g --request PUT '{{baseUrl}}/payment-links/INV8446471886220' \
--header 'merchantId: {{merchantId}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--data-raw '{
"expiry":"2022-03-21 16:12:12"
}'
Sample response
Success scenario
{
"status": 0,
"message": "paymentLink updated",
"result": null,
"errorCode": null,
"guid": null
}
Failure scenario
{
"status": -1,
"message": "expiry cannot be less than the current date",
"result": null,
"errorCode": null,
"guid": null
}
Request Parameters
Reference information for request parameters
Parameter | Reference |
---|---|
key | For more information on how to generate the Key and Salt, refer to any of the following: - Production: Generate Merchant Key and Salt - Test: Generate Test Merchant Key and Salt |
hash | Hash logic for this API is:sha512(key|command|var1|salt)
sha512 |
var1 | For JSON fields description, refer to Additional Info for General APIs |