Update Payment

Update an existing payment record by its own id — no invoice or bill id is required in the path. Supports partial updates of `amount`, `paymentMethod`, `paymentDate`, `notes`, and `paymentReference` — the same fields the Coperniq UI exposes when editing a logged payment. If the payment is external (processed by Stripe), only `notes` may be updated; any other field returns a `400`. Updating `amount` may fail with a `400` if the new total would exceed the parent invoice/bill's outstanding balance. The parent document's `amountPaid`/`status` are recalculated automatically.

Authentication

x-api-keystring
API Key authentication via header

Path parameters

payment_idstringRequired

Request

This endpoint expects an object.
amountdoubleOptional
Payment amount in dollars
paymentMethodenumOptional
Payment method
paymentDatestringOptionalformat: "date-time"
notesstringOptional
Optional notes about the payment
paymentReferencestring or nullOptional

Response

Payment updated successfully
Paymentobject
OR
BillPaymentobject

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error