DELETE
/
wp-json
/
latepoint-api
/
v1
/
payments
/
{id}
{
  "success": false,
  "error": "Payment not found"
}

Path Parameters

id
integer
required
The unique identifier of the payment to delete

Example Request

DELETE /wp-json/latepoint-api/v1/payments/1
X-API-Key: YOUR_API_KEY
Content-Type: application/json

Example Response

{
  "success": true,
  "message": "Payment deleted successfully"
}

Error Responses

{
  "success": false,
  "error": "Payment not found"
}
{
  "success": false,
  "error": "Cannot delete payment with completed status. Please refund first."
}
{
  "success": false,
  "error": "Failed to delete payment"
}

Important Notes

Deleting a payment is a permanent action and cannot be undone. Consider using the update endpoint to change the status to “cancelled” or “refunded” instead of deleting the record entirely.
Some payment processors may not allow deletion of completed transactions. In such cases, you should use the refund functionality instead.