We are using cookies to improve your experience!

By clicking "Allow all", you agree to use of all cookies. Visit our Privacy Policy to learn more.

Delete Payment

Overview

Delete a payment record. This reverses the payment on the associated invoice, updating its balance and status.

Path

DELETE /api/v1/payments/{id}

Path parameter: id (integer, required) - The unique ID of the payment.

Query Parameters

None.

Request Headers

  • Content-Type: application/json
  • Authorization: Bearer <token> (OAuth 2.0 token)

Request Body

None.

Response

Success (204 No Content)

No response body. The payment is deleted.

Errors

Status Code Description Example Body
401 Unauthorized Invalid or missing token. {"error": "Unauthorized"}
403 Forbidden Insufficient permissions. {"error": "Forbidden"}
404 Not Found Payment not found. {"error": "Payment not found"}
500 Internal Server Error Server error. {"error": "Internal Server Error"}

Usage Notes

  • Deletion is permanent and cascades to invoice updates.
  • Use with caution in production; consider soft deletes for audits.
  • Triggers invoice status reversion (e.g., from paid to unpaid).