Record a payment

POST https://app.speybooks.com/api/v1/invoices/{id}/payment

Records a payment against an invoice. The invoice status is updated automatically based on the total amount paid:

  • If cumulative payments equal the invoice total, the status transitions to paid.
  • If cumulative payments are less than the total, the status transitions to partial.

Overpayment is rejected with a 400 error. The amount must be in minor units (pence) — for example, £50.00 is sent as 5000.

The payment date defaults to today if omitted.

Payments cannot be reversed via the API. To correct an overpayment or wrong amount, cancel the invoice and create a credit note.

Path parameters

id string required

Body parameters

amount integer required
min: 1
date string optional
date

Response

200 Default Response
Show response fields
amountPaid integer
newStatus string

Error codes

400 Default Response
404 Invoice not found.