Authorizations and charges
What the payer authorized, each economic effect against it, and the two axes every charge moves on.
Public Beta · early access
Authorization
What a payer authorized, created when a rail verifies a proof.
- single — an x402 payment or an MPP charge. At most one charge that was not released. If the handler failed and the charge was released, the same proof can be presented again.
- reusable — an L402 credential, a KYAPay token, an MPP session, or a credit account. Many charges until the
limitis consumed or the authorization expires.
Authorizations are keyed by rail and proof, so presenting the same proof finds the same authorization. That is replay protection for single-use proofs and reuse for reusable ones.
Charge
One economic effect against an authorization, tracked on two independent axes.
payment reserved ──► settling ──► settled ──► refund_pending ──► refunded
│ │ ▲ │
▼ ▼ │ ▼
released unknown ◄────────────────────┘ resolved by lookup
│
▼
failed
fulfillment pending ──► running ──► completed
│
▼
failed- Creating a charge reserves its amount on the authorization atomically. Settling commits it; releasing returns it.
- Every provider call is preceded by a write (
settling,refund_pending) and followed by one. - A timeout or ambiguous answer becomes
unknownand is resolved only by asking the provider. - The payment axis says whether money moved; the fulfillment axis says whether the service exists. Reconciliation uses both.
A paid call, step by step
| Step | Charge |
|---|---|
| Proof verified, capacity reserved, handler starts | reserved / running |
| Handler succeeds | settling / completed |
| Provider confirms | settled / completed |
| — or handler fails | released / failed |
| — or provider rejects settlement | failed / completed, the output is withheld and a fresh 402 is sent |
| — or provider does not answer | unknown / completed, the output is served and reconciliation resolves it |