How can I expire a Pay by Link payment link?

If you want to programmatically expire a Pay by Link payment link, you can do so using a PATCH request to our /paymentLinks/{linkId} endpoint. In your request you can set the desired new status to "expired". More information can be found here: Adyen Checkout API.

Example:

PATCH - https://checkout-test.adyen.com/checkout/v53/paymentLinks/{linkId} 

Request:
{
"status":"expired"
}

Response:
200 OK

{
"amount": {
"currency": "EUR",
"value": 4200
},
"countryCode": "NL",
"expiresAt": "2020-08-11T08:37:11Z",
"id": "LINK_ID",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_REFERENCE",
"shopperLocale": "en-US",
"status": "expired",
"url": "https://checkoutshopper-test.adyen.com/checkoutshopper/payByLink.shtml?=LINK_ID”
}

For more information on how to check the status of a payment link, refer to How can I check the status of a Pay by Link payment link?

Was this article helpful?
0 out of 0 found this helpful