Lifecycle diagram
Stage-by-stage
| Stage | What happens |
|---|---|
| Invoice created | POST /v1/invoices → status awaiting_payment, webhook invoice.created queued |
| Awaiting payment | Customer opens checkout at pay.meum.io/{invoiceId} |
| Quote created | Customer selects origin token → status may become quoted |
| Blockchain payment detected | Meum payment monitor detects deposit |
| Confirmation/validation | Amount compared to expected; status set to paid or underpaid |
| Invoice paid | Terminal status; settlement log written |
| Webhook queued | BullMQ job enqueued for delivery |
| Merchant integration receives webhook | HTTP POST with signed payload |
| Order updated | WooCommerce calls payment_complete() on invoice.paid |
Open vs terminal statuses
Open (can receive payment):awaiting_payment, quoted, pending
Terminal (no further payment updates): paid, underpaid, failed, expired, refunded, cancelled