OPDC API error code

INVOICE_NOT_PAYABLE

HTTP status 422

A payment names an invoice that cannot be paid: another vendor's invoice, one already paid or void, one held for review or dispute, or one that bills a subcontract whose payments are on hold. 422.

The detail names each invoice and why. Nothing is written.

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

How errors work, and what to retryEvery error code