Advance payments and payment date validation
A payment date earlier than the issue date is now accepted as an advance payment, and a payment date later than today answers 422. It applies to sales and expenses, to marking as paid and to registering a payment.
30 October 2026 — The date of a payment no longer has to be on or after the issue date of the
document. A payment made before the document was issued is an advance payment and is accepted.
A payment date later than today is rejected with a 422 domain error.
Operations in this release
| Operation | operationId | MCP tool | What changes |
|---|---|---|---|
POST /v1/companies/{company}/invoices/{invoice}/mark-paid | public-api.v1.invoices.mark_paid | mark_invoice_as_paid | paid_on earlier than the issue date is accepted. A future paid_on answers 422. |
POST /v1/companies/{company}/invoices/{invoice}/payments | public-api.v1.invoices.payments_create | register_invoice_payment | paid_on earlier than the issue date is accepted. A future paid_on answers 422. |
POST /v1/companies/{company}/purchase-invoices/{purchase_invoice}/mark-paid | public-api.v1.purchase_invoices.mark_paid | mark_purchase_invoice_paid | paid_on earlier than the supplier document issue date is accepted. A future paid_on answers 422. |
POST /v1/companies/{company}/purchase-invoices/{purchase_invoice}/payments | public-api.v1.purchase_invoices.register_payment | register_purchase_invoice_payment | paid_on earlier than the supplier document issue date is accepted. A future paid_on answers 422. |
The rule
A payment date must not be later than today (Europe/Madrid day). Nothing else limits it.
- Before the issue date: accepted. A customer can pay before the invoice is issued, and you can pay a supplier before its document arrives. Record the real date: it is the one used by the collection cycle, the aging reports and the bank reconciliation. Do not alter the date to fit the issue date.
- Later than today:
422. Registering a payment confirms something that already happened. A payment that is only expected is the due date of the document.
The response is 422. The error always points at the date, but its code, subcode and param depend on
the operation:
- Sales,
mark-paidandpayments:error.codebusiness_rule_violation, noerror.subcode,error.parampayment_date. - Expenses,
mark-paid:error.codeinvalid_payment_date, noerror.subcode,error.parampayment_date. - Expenses,
payments:error.codebusiness_rule_violation,error.subcodeinvalid_payment_date,error.parampaid_on.
On three of the four operations param carries the name the date has in the domain (payment_date), even
though the request field is paid_on. To tell this error from other 422 responses, check these values for
the operation you called. Do not match on message.
What was wrong before
- A
paid_onearlier than the issue date was rejected, so an advance payment could not be recorded with its real date. POST /v1/companies/{company}/invoices/{invoice}/mark-paidwith a futurepaid_onanswered500. It now answers the same422as the other operations.
Same rule everywhere
- Bulk status.
POST /v1/companies/{company}/invoices/bulk-statusandPOST /v1/companies/{company}/purchase-invoices/bulk-statustake the date inpayment_dateand apply the same rule. Apayment_datelater than today rejects the whole call with422(error.codeinvalid_param_value,parampayment_date) before any document is processed. A date before the issue date of a document is accepted.failures[]reports only the documents that cannot take the payment for another reason, such as an unknown id or a status that does not allow it. - MCP. The four tools above follow the same rule and answer with the same error as their REST operation.
- Payment gateways. Stripe collections on an existing invoice are recorded with the real date of the charge, never later than today. They are no longer moved forward to the issue date of the invoice.
What to do:
- Send the real date of the payment in
paid_on, even when it is earlier than the issue date. - Do not send a future date. If you handled the old
500ofmark-paid, handle the422instead. - Do not rely on
paid_onbeing on or afterissued_onin your own validations or reports.
The table below lists the operations of this release.
Updated endpoints4
| Endpoint | Description |
|---|---|
POST/v1/companies/{company}/invoices/{invoice}/mark-paid | Mark invoice as paid |
POST/v1/companies/{company}/invoices/{invoice}/payments | Register a payment |
POST/v1/companies/{company}/purchase-invoices/{purchase_invoice}/mark-paid | Mark expense as paid |
POST/v1/companies/{company}/purchase-invoices/{purchase_invoice}/payments | Register an expense payment |