invoice.failed
Fired when an invoice reaches a non-recoverable failure state. Thedata.failure_reason field tells you exactly what happened.
Today this event fires for wrong-token deposit resolutions — when a customer paid the deposit address using a different token than the invoice expected, and a Settlx admin processes the resolution. Future failure modes will also use this event with new failure_reason values, so handle the field as an extensible enum.
Failure reasons
What to do
Branch ondata.failure_reason:
wrong_token_refunded
- Mark the order as failed in your system
- Notify the customer that their payment was returned
- Release any reserved inventory
- Do not fulfil the order — no funds arrived
wrong_token_forwarded
- The funds did arrive in your merchant wallet, in whatever asset the customer actually sent
- Decide whether you accept this as fulfilment of the order
- Use
data.withdrawalAmountanddata.withdrawalCurrencyto record what was received
Payload
Handler example
Node.js
Future failure reasons
failure_reason is designed as an extensible enum. New values may be added over time without introducing new event types. Always handle unknown values gracefully — log them and either treat as a generic failure or escalate to manual review.
Related events
invoice.settled— The happy path. If you receiveinvoice.failedyou will not receiveinvoice.settledfor the same invoice.invoice.expired— Different failure mode (timeout, no wrong-token involved).