Skip to content

deleteLink

Delete an unused payment link. Only links that have not yet been paid can be deleted.

Request

POST /api/v2/deleteLink

Headers

Header Required Description
token Yes Your API Key
Content-Type Yes application/json

Body Parameters

Field Type Required Description
link_id integer Yes The linktopay_id of the link to delete

Response

Success (ResponseCode: 1)

{
  "ResponseCode": 1,
  "ResponseMsg": "Link has been deleted successfully",
  "Result": "True",
  "ServerTime": "CEST"
}

Error (ResponseCode: 0)

{
  "ResponseCode": 0,
  "ResponseMsg": "Invalid link ID",
  "Result": "False",
  "ServerTime": "CEST"
}
ResponseMsg Cause
This link is already used Cannot delete a paid link
Invalid link ID Link not found or belongs to another user
Please enter link_id Missing link_id field

Examples

curl -X POST https://app.secpaid.com/api/v2/deleteLink \
  -H "Content-Type: application/json" \
  -H "token: YOUR_API_KEY" \
  -d '{"link_id": 12345}'
const response = await fetch("https://app.secpaid.com/api/v2/deleteLink", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "token": "YOUR_API_KEY"
  },
  body: JSON.stringify({ link_id: 12345 })
});
$response = Http::withHeaders([
    'token' => 'YOUR_API_KEY',
])->post('https://app.secpaid.com/api/v2/deleteLink', [
    'link_id' => 12345,
]);

Notes

  • Only Unused links can be deleted
  • Deletion is permanent — the link URL will return a 404
  • No webhook is sent when a link is deleted
  • You can only delete links that belong to your account