OPDC API error code

INVOICE_AMOUNT_MISMATCH

HTTP status 422

An AP invoice sent an invoiceBalance or invoiceNet that is not the value the invoice computes: the balance is the invoice total and the net is the total less retention. 422.

Omit both, and send retention to hold an amount back. Nothing is written.

The API answers with a problem document (RFC 9457) whose type is https://twinn.engineering/errors/invoice-amount-mismatch, and with X-Error-Code: INVOICE_AMOUNT_MISMATCH. Branch on the code, never on the detail text.

How errors work, and what to retryEvery error code