Flows
The order in which a charge settles and the service runs.
Pre-release · planned API
| Flow | Order | Handler fails | Typical rails |
|---|---|---|---|
authorization | reserve · run · complete · settle | release — nothing moved | x402, KYAPay, sessions, L402, credits |
upfront | reserve · settle · run · complete | refund | MPP with Stripe (captured at verification) |
escrow | settle deposit · run · settle final | refund the deposit | Planned — refused in this version |
- Each rail declares the flows it supports. A route without
flowuses the first the rail supports, preferringauthorization, where the payer is charged only for work that ran. upfrontrequires a rail that can refund.- Variable prices (
upTo) requireauthorization. - Choose explicitly with
toll.price("$0.05", { flow: "upfront" }). Unsupported combinations fail where the route is defined.