The x402 off-ramp, explained

x402 revives HTTP status code 402 (Payment Required) as a machine-payable challenge: instead of API keys and billing dashboards, the server quotes an exact on-chain price in the response and the client pays it in-band. FiatDock uses it to price the off-ramp at $0.05 USDC per session — no signup, no minimum, no subscription.

See the challenge yourself (live)

curl -X POST https://fiatdock.com/v1/offramp/session \
  -H "Content-Type: application/json" -d '{"cryptoAmount": 50}'

The response is 402 with an accepts array: the asset (USDC), the network (Base), the exact amount, and the payTo address. Nothing is hidden — the challenge is the price list.

Paying it in three lines

import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";

const payFetch = wrapFetchWithPayment(fetch, privateKeyToAccount(KEY));
const r = await payFetch("https://fiatdock.com/v1/offramp/session", { method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({ cryptoAmount: 50, email: "owner@example.com" }) });

x402-fetch reads the challenge, signs the $0.05 transfer from the agent's wallet, and retries with the X-PAYMENT header automatically. The paid response carries a one-time checkoutUrl + partnerOrderId. Prefer tools over code? npx fiatdock-mcp does the same via MCP.

What the $0.05 buys

A session at a licensed provider (Transak) where the actual conversion happens: USDC from the sender's wallet → provider → fiat in the owner's own bank account. FiatDock never custodies funds. Quotes (GET /v1/quote) and order status are free, so agents can compare before spending anything.

Why x402 fits agents

Agents can't fill signup forms or store card numbers. With x402 the only credential is the wallet the agent already has — payment, authentication and rate-limiting collapse into one signed transfer. Discovery is machine-readable too: llms.txt, OpenAPI, tools.json.

More guides: USDC to bank account API · How an AI agent cashes out crypto · MCP payments server · FAQ

Eligibility: 18+, own-account rule (sender wallet and receiving bank account belong to the same person), Portugal + Transak-supported EU/EEA countries (not the UK or restricted jurisdictions — see Terms). Crypto is volatile; nothing here is investment advice.