Invoice lifecycle
Every invoice moves through a small state machine. Knowing which state triggers which webhook is the difference between a clean integration and a flaky one.
pending- created, address assigned, waiting for payment. TTL: 60 minutes.
paid- matching transaction detected on-chain, not yet block-finalized. Webhook:
invoice.paid. confirmed- payment reached finality (6 confirmations on Ethereum, 8 on BSC, 10 on Tron, 50 blocks on Arbitrum; on Solana, every contributing signature reaching the
finalizedcommitment level). Webhook:invoice.confirmed. underpaid- transaction landed, amount received less than expected. Webhook:
invoice.underpaid. Checkreceivedand decide. expired- TTL elapsed without matching transaction. Webhook:
invoice.expired. An invoice can staypendingpastexpires_atwhile Cassia double-checks a payment it might have missed — usually a few minutes; in rare cases longer. A partly paid invoice staysunderpaid(notpending) during that window. If a payment is confirmed you receiveinvoice.paidas usual; otherwiseinvoice.expired. cancelled- you called cancel before payment. Terminal; no webhook.
Webhook timing
invoice.paidfires seconds after the customer broadcasts.invoice.confirmedfires after finality — seconds on Tron and Arbitrum, ~2 min on BSC, ~3 min on Ethereum.- Solana can be slower to notify. Solana deposits are detected two ways: a live notification from our chain provider, and a sweep that runs about once a minute. The sweep is the guarantee — budget for it, and treat the live notification as an optimisation that may or may not arrive first. So
invoice.paidcan trail the transaction by a minute or two.invoice.confirmedis checked by the same ~1-minute sweep for the first hour after payment, so it normally trailsinvoice.paidby about a minute; past that hour a slower 10-minute sweep takes over and it can trail by up to ~10 minutes. Both events still arrive, and the order and payload contract are identical to every other chain. - The same invoice usually generates both. See When to grant access for which one to key your logic off.
After expired: the address is still part of your wallet’s key tree. If the customer sends a late payment, it is not credited to the invoice and Cassia won’t fire a webhook for it. The funds are on the invoice’s
deposit_address — normally your own wallet. If the invoice had redirected: true, that address is Cassia’s, so contact support. Show expiry clearly in your UI.Updated . For integration help, email [email protected]