HTTP status 422. Only the Affinity app gets this code.
The invoice credit makes the draft total negative.
Recovery
Reduce the credit in Stripe by the stated amount so the total is at least zero, then approve again.
Branch on code, not on the text of detail. Give Affinity the requestId when you report a problem.