Update an invoice payment
PATCH/api/v1/invoices/:invoice_id/payments/:id
Updates an existing payment. On a payment collected through GoCardless, amount, payment_date and payment_means_code are immutable - they are facts of the mandate collection - and submitting any of them is refused with 422. Only reference and note can be changed on such a payment. On a payment created by confirming a bank reconciliation only note can be changed: a request carrying any other attribute, even with its current value, is refused whole with 422 dependent_records. A note-only change touches nothing else - no lifecycle event, no e-reporting or accounting update.
Request
Responses
- 200
- 401
- 403
- 404
- 422
The payment was updated with the submitted attributes
The request did not include a valid OAuth 2.0 access token
The access token does not carry the write scope required to update the payment
No payment exists with the given ID on this invoice
The payment could not be updated; details reports the reason (for example, it belongs to a transmitted e-reporting period, or it was collected through GoCardless and the request tried to change its amount, payment date or payment means). A payment created by confirming a bank reconciliation answers dependent_records when any attribute other than note is submitted, even unchanged, with details.bank_operation_id naming the operation to unconfirm