Skip to content
Docs menu

Endpoints

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

  • id string Required
    The link's ID, such as lnk_tDofQnHNbxq9jsyq.

Errors

  • 404 not_found
    No link with that ID belongs to your business.
  • 403 test_mode_unavailable
    A test key can't delete links on a live business, so use a live key.
  • 409 link_has_payments
    The 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  }}