🌟 New (June 2026): Stellar settlement is live. Sly’s governed x402 flow
now settles on
stellar:testnet under the same L1–L5 governance loop as
Base — fees sponsored, ~5s finality, agentic identity baked into the
signed witness receipt. See Settling on Stellar
for the full guide.HTTP 402 Payment Required status code for micropayment flows. The pattern:
- Client calls a protected endpoint
- Server responds
402 Payment Requiredwith a payment quote - Client pays (typically stablecoin, on-chain)
- Client retries with a payment proof
- Server verifies and returns the real response
The request/response dance
First call — no payment:The SDK shortcut
The SDK wraps all of this into one call:/v1/x402/pay, retry with X-Payment-Proof.
Serving x402 endpoints (API provider side)
Register your x402 endpoint so Sly can facilitate payments:receiver_wallet_id and issues the payment_proof that the API will verify.
Verifying proofs (API provider side)
When your server receives a request withX-Payment-Proof:
{ "valid": true, "payment_id": "..." } or a failure reason. The SDK and Sly server-side middleware handle this for you.
x402 facilitator (sandbox only)
Sandbox endpoints have a test facilitator that issues mock proofs without real on-chain settlement:https://www.x402.org/facilitator, which supports both Base mainnet (eip155:8453) and Stellar mainnet (stellar:pubnet — Phase B). For rail-specific guides, see Settling on Base, Settling on Stellar, or the side-by-side comparison and selectRail() decision function.
x402 bridge
Sly includes an x402 → Circle bridge for tenants that want to accept x402 payments but settle in fiat. Bridges are configured per-endpoint.Endpoints
When to use x402
- You run an API and want per-call monetization (not subscriptions)
- Consumers are agents that discover and pay for APIs at runtime — no sign-up flow
- Price points are too low for traditional billing (fractions of a cent per call)
- You want crypto-native settlement with no card networks in the loop