Delete Payment Link
Deletes (cancels) a payment link. This operation performs a soft delete, changing the payment link status to "Cancelled" rather than permanently removing it from the system. This preserves audit trails and payment history.
Endpoint
DELETE /api/v1/paymentLinks/{id}
Header Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
x-api-key | string | required | PaySuite provided API key |
merchantId | string | required | Customer identifier as provided during customer onboarding |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | uuid | required | Unique identifier for the payment link to delete |
Response Parameters
Status Code: 200 OK
| Parameter | Type | Description |
|---|---|---|
id | uuid | Unique identifier of the deleted payment link |
status | string | Updated status (always cancelled) |
statusChangedAt | dateTime | Timestamp when status changed to cancelled (ISO 8601) |
Example Request
DELETE /api/v1/paymentLinks/550e8400-e29b-41d4-a716-446655440000
Example Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "cancelled",
"statusChangedAt": "2024-10-17T10:19:50Z"
}
Status Code: 404 Not Found
Returned when no payment link is found for the given id.
Important Notes
- This operation performs a soft delete - the payment link is not permanently removed
- The payment link status is changed to
cancelled - This operation can only be performed on payment links with status
created - Completed payment links cannot be deleted
- Cancelled payment links cannot be reactivated
- The payment link URL becomes invalid and returns an error if accessed
- All payment link data, including history and any payments received, is preserved for audit purposes