A payment's credit row is not an open credit of the vendor, or its credits come to more than the invoices they offset; or the invoice or credit a service invoice applies to is not open, cannot take it, or was never posted to the general ledger. 422. Nothing is written.
OPDC API error code
CREDIT_NOT_APPLICABLE
HTTP status 422
The API answers with a problem document (RFC 9457) whose type is https://twinn.engineering/developers/errors/credit-not-applicable, and with X-Error-Code: CREDIT_NOT_APPLICABLE. Branch on the code, never on the detail text.