Settlements
Convert stablecoin liquidity into local destination rails using quote locks.
Settlements combine a quote, source funds, destination information, corridor rules, and final delivery webhooks.
Quote lock
A quote includes rate, fee estimate, destination amount, and expiry. Create the settlement before expires_at; otherwise request a new quote.
Settlement lifecycle
| Status | Meaning |
|---|---|
requires_funding | Stablecoin funds have not arrived or are below the required amount. |
quoted | The quote is reserved and can be executed. |
processing | Funds are moving through M2Square and local partners. |
completed | Destination rail confirmed delivery. |
returned | Funds could not be delivered and were returned. |
failed | Settlement could not continue. Review the error code and event timeline. |
Ledger design
- Create a pending ledger entry when you create the settlement.
- Update only after receiving signed webhooks.
- Reconcile
source_amount,destination_amount,fee_amount, andrate. - Treat returned settlements as a new ledger movement instead of editing historical entries.