State machines
Every state each Abazi object can be in and the moves allowed between them, from payment intents to webhook deliveries.
Payment intent
From request to confirmation. reconciling holds a payment whose outcome is unknown after signing: the money stays reserved until the network gives an answer.
| From | Can move to |
|---|---|
| created | denied, awaiting_approval, reserved |
| awaiting_approval | reserved, denied |
| reserved | signing, denied |
| signing | submitted, failed, reconciling |
| submitted | confirmed, failed, reconciling |
| reconciling | confirmed, failed |
| confirmed | refunded |
Approval
A request for a person. Expires after the approval window; a changed price or payee invalidates it.
| From | Can move to |
|---|---|
| pending | approved, rejected, expired, invalidated |
| approved | consumed, invalidated |
Delivery
Tracked apart from payment, because paid does not always mean delivered.
| From | Can move to |
|---|---|
| not_started | processing |
| processing | delivered, failed |
Mandate
A version starts as a draft and becomes active when the owner signs it. It ends when a newer version supersedes it, the owner revokes it, or it expires.
| From | Can move to |
|---|---|
| draft | active |
| active | superseded, revoked, expired |
On-chain permission
The capped permission an owner signs on Solana. It ends when the owner removes it, when the cap is used up, or when it expires.
| From | Can move to |
|---|---|
| pending_signature | active |
| active | revoked, exhausted, expired |
Plan
An installment plan or subscription, approved once for its full terms.
| From | Can move to |
|---|---|
| pending_approval | active, cancelled |
| active | completed, cancelled, failed |
Plan payment
One scheduled pull of a plan, with one retry if it fails.
| From | Can move to |
|---|---|
| scheduled | pulling, skipped |
| pulling | paid, failed |
| failed | pulling, skipped |
Virtual card
One card per agent: active, paused or closed.
| From | Can move to |
|---|---|
| active | paused, closed |
| paused | active, closed |
Card authorization
Each authorization the card issuer asks Abazi to decide in real time.
| From | Can move to |
|---|---|
| pending | approved, declined, challenged |
| challenged | declined |
| approved | cleared, voided |
| cleared | returned |
Merchant tier
UNKNOWN, KNOWN, VERIFIED, and the resets that send a merchant back to UNKNOWN.
| From | Can move to |
|---|---|
| UNKNOWN | KNOWN, VERIFIED |
| KNOWN | VERIFIED, UNKNOWN |
| VERIFIED | UNKNOWN, KNOWN |
Dispute
Opened from a receipt. The merchant accepts or contests it with evidence; it ends refunded or closed.
| From | Can move to |
|---|---|
| opened | evidence, accepted, closed |
| evidence | accepted, contested |
| accepted | refunded |
| contested | refunded, closed |
Refund
A refund on a stablecoin or card rail, with its own receipt.
| From | Can move to |
|---|---|
| requested | submitted |
| submitted | settled, failed |
Webhook delivery
Retries until delivered or dead.
| From | Can move to |
|---|---|
| pending | delivered, retrying |
| retrying | delivered, dead, retrying |