Sessions
Everything is a Session. Every payment, deposit, and transfer is a Session object. The session ID (ses_xxx) is the universal reference — it’s the payment intent, the checkout URL, and the status tracker all in one.
Session Types
| Type | Created by | What it is |
|---|---|---|
checkout | Developer or widget | Any payment — online, POS, API paywall |
transfer | Developer | Wallet-to-wallet (routed via Stableyard for privacy) |
deposit | System (auto) | Created when money arrives at a deposit address |
checkout is the default. You don’t need to specify it.
Payment Flows
One-Step Flow (agents, server-to-server)
If you know the source chain upfront, passsourceChain during session creation:
Two-Step Flow (widgets, UIs with chain selection)
If you want the user to pick their source chain:Execution Modes
| Mode | Behavior | When to use |
|---|---|---|
standard (default) | Full meta-aggregation, gateway calldata (approve + deposit, 2 tx) | API integrations |
boosted | Returns deposit address, 1 tx | Widget, agents — simpler UX |
Quote → Commit Flow
- Quote without commit = preview with alternatives. User can switch chains freely. No order created.
- Quote with
commit: true= creates routing order, returns deposit info. alternativesalways returned — all providers ranked by output amount.
Key Points
- Same-chain: direct transfer to merchant, sub-second, no routing
- Cross-chain: 3–15 seconds via Stableyard’s routing network
- Vault payment: separate flow via
POST /sessions/:id/paywith EIP-712 signature - Privacy: Transfers route through Stableyard — Alice → Stableyard → Bob (separate transactions, no direct link)