- ›
/payments— the buy-side x402 primitive: give an agent a crypto wallet and let it settle paywalls in USDC on Base - ›
quote— probe an x402 URL for its price with zero side effects; the wallet is not even loaded - ›
pay— fetch, sign a USDC payment within the wallet's limits, retry once, keep the receipt - ›
receipts— every settled payment links to its onchain transaction; reconcile buy-side and sell-side - ›
No approval queue— the per-transaction cap is enforced inside the custody plane at signing time, so it holds even if the runtime is compromised - ›
Opt-in and per-agent— off by default, no company-level fallback; pairs with /wallet, /cards, and /research
An agent that can research, email, and file paperwork still hits a wall the moment a resource costs money — the metered API, the paywalled report, the pay-per-call model endpoint. Naïve is the autonomous company infrastructure that gives agents real-world capabilities, and /payments is the primitive for the open-web equivalent of pulling out a card: give each agent its own crypto wallet and let it settle x402 paywalls in USDC — quote the price, pay, and keep the receipt.
x402 is the HTTP 402 payment protocol. A paywalled resource answers a request with 402 Payment Required and a header describing what it accepts. /payments gives each agent a per-agent wallet (USDC on Base) and lets it settle those 402s autonomously: quote the price, sign a USDC payment, retry the request, keep the receipt.
The three verbs
| Command | Description |
|---|---|
naive payments quote | Probe an x402 URL for its price — no side effects |
naive payments pay | Pay for and fetch an x402 resource — sensitive, spends real USDC |
naive payments receipts | List x402 payment receipts |
quote runs only the first two steps of the flow, which is why it has zero side effects. pay runs the full buy-side flow: fetch → decode the 402 → check the caps → sign in the custody plane → retry once with the payment attached → persist the receipt.
Quote — learn a price safely
naive payments quote --url https://api.example.com/report
naive payments quote --url https://api.example.com/report --method POSTProbes the URL and returns its payment requirements without paying. Zero side effects — the wallet is not even loaded, so this is the safe way to learn a price. If the resource is not paywalled, quote returns free: true with the real HTTP status.
Pay — the full buy-side flow
naive payments pay --url https://api.example.com/report
naive payments pay --url https://api.example.com/report --max-amount 0.50
naive payments pay --url https://api.example.com/report --method POSTFetches the resource; if it returns 402, signs a USDC payment from the agent's wallet, retries the request once with the payment attached, and returns the resource body plus a receipt.
| Flag | Description |
|---|---|
--url <url> | The x402 resource URL (required) |
--max-amount <amount> | Refuse to pay more than this — a per-call ceiling in decimal USDC |
--method <method> | HTTP method (default GET) |
pay is sensitive — it spends real USDC. There is deliberately no approval queue. What bounds a payment:
- The wallet balance — an agent cannot spend what isn't there.
perTxMax— enforced at runtime and as a static policy inside the custody plane at signing time. Set it withnaive wallet policy.dailyBudget(optional) — a rolling runtime counter, reserved before the payment is signed.--max-amount— a ceiling on this one call. The effective cap ismin(--max-amount, perTxMax).
If the resource returns something other than 402, no payment is made — the response comes back with paid: false and no receipt.
Receipts — reconcile every payment
naive payments receipts
naive payments receipts --direction buy --limit 10
naive payments receipts --origin https://api.example.com
naive payments receipts --since 2026-07-01T00:00:00Z| Flag | Description |
|---|---|
--direction <direction> | buy (paid out) or sell (received) |
--origin <origin> | Filter to one resource origin |
--since <iso> | Only receipts at/after an ISO-8601 timestamp |
--limit <n> | Max receipts to return |
Every settled x402 payment is recorded here, each linking the payment to its onchain transaction (txHash). Amounts on a receipt are decimal USDC strings. An agent-to-agent payment produces two receipts sharing an origin and nonce — a buy on the payer and a sell on the payee.
From code
The same three verbs are on the SDK client, per agent:
// Probe the price — zero side effects
const quote = await naive.forUser(alice.id).payments.quote({
url: "https://api.example.com/report",
});
// quote.free, quote.status, quote.accepts[]
// Pay for and fetch it, refusing to spend more than $0.50 on this call
const result = await naive.forUser(alice.id).payments.pay({
url: "https://api.example.com/report",
max_amount: "0.50",
});
// result.status, result.body, result.paid, result.receipt
// Reconcile
const receipts = await naive.forUser(alice.id).payments.receipts({
direction: "buy",
limit: 10,
});Or the raw API — the endpoints are POST /v1/users/:user_id/payments/quote, POST …/pay, and GET …/receipts:
const res = await fetch(
"https://api.usenaive.ai/v1/users/USER_ID/payments/pay",
{
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.NAIVE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://api.example.com/report",
max_amount: "0.50",
}),
},
);
const { status, body, paid, receipt } = await res.json();Inside an agent loop, the same surface is available as MCP tools — naive_payments_quote, naive_payments_pay (marked sensitive), naive_payments_receipts, and the read-only naive_wallet_balance. The wallet's admin verbs are deliberately not agent tools.
What you can build
Pay for pay-per-call research and data — Pair /payments with /research so an Employee can buy the metered API or premium report it needs, then cite it. The purchase is a receipt, not a mystery line item.
Evaluate vendors, then commit — A finance Employee quotes several priced endpoints, compares, and pays for the one it picks — every step reconciled against the receipt log.
Build agent-to-agent economies — One Employee pays another for work by URL; both sides get a receipt sharing the same nonce, so settlement between agents is auditable end to end.
Settle metered steps inline — Pay the paid image model, the paid TTS endpoint, or the paid enrichment API mid-pipeline, bounded by a cap the agent physically cannot exceed.
Get started
Drop this starter prompt into any coding agent to wire up Naïve:
Read https://usenaive.ai/skill.md and use it to set up Naïve in my project.
- Read the docs: usenaive.ai/docs/getting-started/payments
- Quickstart: usenaive.ai/docs/getting-started/quickstart
- Pair it with
/walletfor custody and/cardsfor fiat spend - Join the community on Discord
What is /payments?+
When should I use quote vs pay?+
Why is there no approval prompt before a payment?+
What units are amounts in?+
Which providers does it use?+
How do I get started with /payments?+
Engineering at Naïve. Owns the payments and wallet primitives.
Give each agent its own onchain crypto wallet — read its address and balance, and, as an operator, fund it, transfer, set the spend policy, and sweep it. The private key never enters the agent runtime and the spend cap is enforced inside the custody plane.
Issue virtual cards for your agents — a prepaid gift card or a managed virtual card — funded via checkout, capped by a spending limit, and fully audited.
Three depths of web research — single-page extraction, multi-source web search, and full multi-step deep research with cited synthesis. Backed by Naïve's search providers and ready for agent loops that need real, verifiable facts.