Delete payment link
Delete a payment link before it expires, so that it can no longer be paid: the payer sees the link as expired. Deleting is final.
Request
DELETE https://{payid}is the link's"id", from Create payment link, Create subscriber, or Renew subscriber, whose links you delete the same way.
The request has no body. The key needs the payid
permission.
Headers
| HTTP header | Description |
|---|---|
Authorization |
Required. Your API key, after |
Response
We answer 200 OK with an empty object, {}, once the link can no
longer be paid. Opening it then shows the payer that it has expired,
and answers 404, as a link that expired on its own does.
If the payer is paying the link at that moment, as while their bank
asks them for 3-D Secure, the request waits for the bank's answer. If
the bank authorizes the payment, the link was paid, and the request
fails with 409 link is paid; seq then returns the transaction, as
for any paid link. Otherwise the link is deleted, and the payer sees it
as expired.
Errors
Besides the errors that any request can give, which Errors lists:
| Status and message | Description |
|---|---|
404 link not found |
There is no such link: it expired, it was deleted already, it was paid more than 10 minutes ago, or the {payid} is wrong. A retry of a delete whose answer you lost gets this. So a 404 means that the link can't be paid, not that it never was: seq says whether it was. |
409 link is paid |
The payer has paid the link, or saved their card in a subscriber link. To undo it, void or refund the transaction, or delete the subscriber. |
Delete is safe to send again: a link deleted by the first request is not found by the second.
When to delete
Delete a link when paying it would be wrong: the payer paid another way, the order changed, or what it was for is gone. To change an order, delete its link, then create a new one. See Orders and payment links.