# Suize — the payment rail for AI agents > Agents pay businesses in USDC on Sui — gasless, over x402. Humans give their > AI a capped account it can never overspend. Every settlement is an on-chain > balance change anyone can read; the fee is one of the declared outputs, so it > is visible on-chain. If you are an agent reading this, this file is your > contract: how to pay, and how to get paid. One rail, two sides: - CHARGE — businesses get paid by agents. One middleware line answers HTTP 402 with an x402 payment challenge; the agent pays gaslessly; the facilitator verifies and settles. Keyless — a Sui address is the whole account. No KYB, live in minutes. - PAY — humans fund a capped account for their AI: it spends only what was funded, every move is logged, and one tap switches it off. Suize implements the x402 Sui `exact` scheme and runs a live x402 facilitator for Sui (`api.suize.io`). Payments ride Sui's protocol-level gasless transfers: the payer signs a transfer with its OWN key and pays NO gas token, ever. ## HOW TO PAY (you are the agent buying something) You called a Suize-gated endpoint and got HTTP 402. The body is an x402 `PaymentRequired` challenge with an `accepts` array of `PaymentRequirements`. Pick the `exact` requirement on the Sui network and read these fields: - `scheme` — `exact`. `network` — the Sui chain tag (e.g. `sui:testnet` / `sui:mainnet`); trust the challenge's value, not assumptions. - `asset` — the USDC coin type to pay in. `payTo` — the merchant's Sui address. - `amount` — the price in atomic base units (USDC has 6 decimals). The amount you pay is exactly this; the merchant absorbs the fee. - `maxTimeoutSeconds` — how long the challenge is honorable. - `extra.outputs` — the declared balance-change set for the settlement (the merchant's amount plus, for onboarded merchants, the fee as a second output). These outputs ARE the receipt: pay exactly the set the challenge declares. - `extra.buildUrl` — an optional Suize helper that builds the exact gasless transaction for you (see below). Plain x402 clients can skip it. ### Door 1 — Suize builds it, you sign (zero gas, zero Sui transaction code) 1. `POST https://api.suize.io/build` `{ "sender": "", "payTo": "", "amount": "" }` → `{ bytes }`. Suize returns an unsigned, gasless `send_funds` transaction carrying the declared outputs. No gas token is involved — only the USDC. 2. Sign `bytes` locally with your own key. The signature is the serialized Sui signature (the base64 `flag || signature || publicKey` a Sui SDK's `signTransaction` returns as `.signature`). Your key never leaves your machine; Suize never signs for you. 3. Retry the original request with the header `X-PAYMENT: ` — the payload carries your signature and the transaction bytes. The merchant's middleware hands it to the facilitator, which verifies and settles (idempotent — a retry is never a double charge). ### Door 2 — you pay directly You already speak Sui: build the same gasless `send_funds` transfer that pays the declared `extra.outputs`, sign it with your own key, and present the x402 `PaymentPayload` in the `X-PAYMENT` header exactly as above. The on-chain balance-change set is the only ground truth. ### Door 3 — you ask your human The challenge carries a `payLink` (or build one yourself). It hands the purchase to your user — a hosted one-tap pay page (`https://pay.suize.io?payTo=…&amount=…&memo=…` — the terms live entirely in the URL). Your user signs in with Google or connects a wallet, taps once, and is returned with `?digest=`. The facilitator's own endpoints (any of which you may call directly): `GET /supported` (the schemes + networks it serves), `POST /verify` and `POST /settle` (`{ paymentPayload, paymentRequirements }`), `GET /terms` (the declared outputs for a merchant+price), `POST /build`. The settled transaction's balance changes are the receipt — read them on-chain yourself; never trust over the chain. ## HOW TO GET PAID (you serve agents) npm i @suize/pay import { suize } from '@suize/pay' const paywall = suize({ to: '0xYOUR_SUI_ADDRESS', price: '0.10' }) // fetch-style (Bun / Hono / Next): Bun.serve({ fetch: paywall(handler) }) // Express: app.use(paywall.express) That is the entire integration. `price` is your price per request, a decimal USDC string. Keyless: `to` — your Sui address — IS your account. No API keys, no signup, no sessions, no webhooks, no dashboard — deleted by design. The chain is the database. The model: an unpaid request gets a 402 carrying the x402 challenge → the agent pays gaslessly through Suize → it retries with the `X-PAYMENT` header → the middleware hands the payload to the facilitator, which verifies the balance changes against YOUR price and address and settles it → the request is served. One settlement = one serve (replay-safe). Your settlement notice is the verify answer — or read the on-chain balance changes yourself. The fee (when one applies) is merchant-absorbed: it is carved as a second declared output inside the SAME atomic gasless transaction, so the payer always pays exactly the listed `amount` and the fee is visible in the on-chain balance changes. A vanilla single-output payment (no extra outputs) carries no fee. The rate lives on the pricing page — an agent never needs it: pay the declared `amount`, honor the declared `extra.outputs`. Subscriptions (recurring billing): the user creates one on-chain subscription object (a fixed merchant, amount, and period) and signs each renewal itself — PUSH, not pull. Nothing ever reaches into the user's account; each period is a user-signed, gasless payment of exactly one period. Cancel is deleting the object on-chain. Merchants self-index subscription state from chain events. ## Products on the rail - Deploy — agents ship static sites to decentralized hosting, paid on the rail. https://deploy.suize.io · agent contract: https://deploy.suize.io/llms.txt - Crash — one-tap BTC up/down, Google sign-in, gasless. https://crash.suize.io · https://crash.suize.io/llms.txt - Wallet — the consumer (human) side: a wallet you talk to that funds a capped account for your AI to pay from. If you are a person rather than an agent, start there. https://wallet.suize.io · https://wallet.suize.io/llms.txt ## Links - How the whole machine works: https://suize.io/#/docs - Pricing (all fees live here): https://suize.io/#/pricing - Home: https://suize.io - This file: https://suize.io/llms.txt