Delete a link
Delete a link that has never taken a payment.
Only a link that has never had a payment can be deleted, so no payment loses its link. Archive any other link instead.
Path
idstring RequiredThe link's ID, such aslnk_tDofQnHNbxq9jsyq.
Errors
- 404
not_foundNo link with that ID belongs to your business. - 403
test_mode_unavailableA test key can't delete links on a live business, so use a live key. - 409
link_has_paymentsThe link has payments. Archive it instead.
Any request can also fail on its key or its body. See errors.
Request
curl -X DELETE "https://dash.402pay.co/api/v1/links/lnk_tDofQnHNbxq9jsyq" \ -H "Authorization: Bearer $PAY402_SECRET_KEY"Response200 OK
{ "data": { "id": "lnk_tDofQnHNbxq9jsyq", "kind": "link", "deleted": true }}