Integrate
Failure reasons
A short reason you can show your customer when a card is rejected.
Every trade.failed carries failure: { kind, message }. The message is written from what the vendor actually reported — “Card already redeemed”, “Zombie card (blocked)”, “Card balance is $0” — with any card code or PIN removed, so you can show it to your customer as-is.
| kind | Typical message |
|---|---|
already_redeemed | Card already redeemed |
duplicate | Card already used |
invalid | Invalid card or code |
wrong_card | Card doesn’t match the type, value or country submitted |
unreadable | Card images weren’t clear enough to redeem |
blocked | Card is blocked (zombie card) |
other | Card could not be redeemed |
Use kind for your own logic and message for people. Escalations where the agent read a failure carry the same object in review.failure.