@jazadev/node throws JazaError with statusCode, code, and raw when the API rejects a call. Switch on code in your BFF; do not parse human messages.
Typical envelope
Common codes
Exact HTTP statuses and codes can vary by endpoint — log
JazaError.raw when debugging.
Retry guidance
- Safe to retry with the same
idempotencyKey: network timeouts and transient 5xx onconsume. - Do not retry unchanged when the wallet is empty or the feature code is wrong — fix the input or send the user to top up.
Always pass
idempotencyKey on consume so retries cannot double-charge.