OPDC API error code

INVOICE_NOT_OPEN

HTTP status 422

A cash receipt applied to an invoice that is not open: it is paid or void. 422.

Nothing is written. Apply the receipt to an open invoice.

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

How errors work, and what to retryEvery error code