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.

Mark Invoice as Paid

PATCH /api/v1/invoices/:id/markaspaid

URL

/api/v1/invoices/:id/mark_as_paid

Mark an invoice as fully paid. This updates the status to paid and sets the paid_at timestamp. Use this for quick closure without creating individual payment records.

Path Parameters

Parameter Type Required Description
id integer Yes The unique ID of the invoice.

Request Body

Request Example

PATCH /api/v1/invoices/123/mark_as_paid HTTP/1.1
Host: koteshen.com
Authorization: Bearer {access_token}
Content-Type: application/json
Accept: application/json

Response

Status Codes:

  • 200 OK - Invoice marked as paid.
  • 401 Unauthorized - Invalid or missing token.
  • 404 Not Found - Invoice not found.
  • 422 Unprocessable Entity - Invoice already paid or balance is zero.

Success Response (200)

Same structure as Retrieve an Invoice, with updated status: "paid" and balance: "0.00".