Expire Invoice API

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

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
ParameterReference
keyFor 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
hashHash logic for this API is:
sha512(key|command|var1|salt)
sha512
var1For JSON fields description, refer to Additional Info for General APIs
Language
Click Try It! to start a request and see the response here!