Skip to main content

Delete Payment Link API

Overview

Permanently delete a payment link by its ID.

API Details

Endpoint

DELETE https://api.gafapay.com/gafapay/v3/user/payment_link/{id}

Path Parameters

  • id (String, required): The unique identifier of the payment link to delete
    • Example: a1b2c3d4e5f6g7h8i9j0

Headers

authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU3MDA3NDEyfQ.ph7qKBEzuHxgljV3141L9iOrWmHI4TnyoknBSNoVYYU
companyid: b760d21412dd473999e374053fb95031
requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b

Request Body

No request body is required for DELETE operations.

Response (Success)

{
"success": 1,
"error": [],
"data": {
"message": "USER_PAYMENT_LINK_DELETED_SUCCESSFULLY"
}
}

Response Fields

  • success (integer): Response status indicator (1 = Success, 0 = Failure)
  • error (array): Array of error messages (empty on success)
  • data (object): Response data object
    • message (string): Success message indicating the payment link was deleted

Response (Failure / Not Found)

{
"success": 0,
"error": [],
"data": {
"check_validation_failed": true,
"validation_message": "BASE_ERROR_IN_REMOVING"
}
}

If the request is invalid (e.g. missing id), the API may return:

{
"success": 0,
"error": ["BAD_REQUEST"],
"data": null
}

Example Usage

curl --location --request DELETE 'https://api.gafapay.com/gafapay/v3/user/payment_link/a1b2c3d4e5f6g7h8i9j0' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...' \
--header 'companyid: b760d21412dd473999e374053fb95031' \
--header 'requestid: be08f79e-7eac-40e1-acbe-00f6ae7b8f7b'

Notes

  • This action is irreversible — the payment link record is permanently removed.
  • The id path parameter is required. Ensure the correct payment link ID is used.
  • On success the API returns USER_PAYMENT_LINK_DELETED_SUCCESSFULLY.
  • If the record cannot be removed (e.g. not found), the API returns BASE_ERROR_IN_REMOVING with check_validation_failed: true.