OPDC API error code

PAYMENT_EXCEEDS_BALANCE

HTTP status 422

A payment's amount and discount on an invoice come to more than the invoice's payable balance: its net due, or its balance including held retention when the application sets includeRetention. 422.

The detail names each invoice and its payable balance. Nothing is written.

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

How errors work, and what to retryEvery error code