agent.pay(url) — and your agent settles a real on-chain payment — live across 12 networks — then receives the gated response.
It is the same idea Stripe brought to web checkouts, applied to machine-to-machine commerce: a drop-in rail an agent uses to pay for any API call, and a drop-in way for a provider to charge for one.
Non-custodial
Agents hold their own keys and sign their own transactions. AiFinPay never takes custody of funds.
Multichain
Contracts live on 12 mainnet networks — 7 with the full smart-contract stack. SDK settlement is live on Polygon today; per-chain routing is rolling out.
Token-free
No protocol token to buy, hold, or speculate on. Agents pay in MATIC/POL or SOL — the assets they already hold.
One HTTP round-trip + one tx
Payment rides on top of the standard x402 challenge. Sign once, retry the request, get your data.
mSECCO are non-transferable usage credits earned through activity — not a tradable asset and not required to make a payment.
What is x402?
x402 revives the long-reserved HTTP402 Payment Required status code as a real protocol. Instead of returning data, a protected endpoint answers an unauthenticated request with 402 plus a small manifest describing how to pay. The client settles the payment, attaches proof, and retries — and this time receives 200 with the payload.
AiFinPay implements x402 end-to-end. The agent SDK auto-detects the facilitator flavor (AiFinPay native, Coinbase x402, and others), signs an Ed25519 challenge, settles on-chain, retries the request, and returns the response — all behind a single agent.pay(url) call.
How a payment flows
1
Request without payment
The agent calls a protected URL. The server answers
402 with a manifest and a one-time nonce.2
Sign the challenge
The agent signs
SHA256("AiFinPay-x402:{nonce}:{pubkey}") with its Ed25519 key and settles the on-chain payment.3
Retry with proof
The agent retries the request with three auth headers. The server verifies and returns
200 plus the payload.Two protocols, one platform
Which side of the transaction you are on decides which protocol — and which host and headers — you use. Mixing them up is the single most common source of confusion, so it is worth thirty seconds now.
Both settle on-chain straight to a wallet, and neither ever holds your funds. If
you are doing both — paying for some APIs while charging for your own — you use
both, independently.
Pick your path
Pay for services
Your agent needs to call paid APIs. Install the SDK and use
agent.pay(url) to settle any x402-protected endpoint.Charge for your API
You run an API and want agents to pay for it. Accept AiFinPay with a single HTTP call inside your existing service — no wallet, no chain library, no KYC.
Reference
Networks, live contract addresses, headers, and field names — the canonical lookup for integrators.