/ app
x402Docs ↗Built on TapeOut ↗Block —
Pay per call

Pay [per call].

Agents pay for APIs with x402: the server answers 402 with a price, the agent pays and asks again. With Fusebox the price goes through the wallet's fuses first (logic circuits taped out on TapeOut), so a scam price list is stopped like a scam invoice, before anything moves.

How a paid call works

  1. 01GET /api/x402/prices

    The seller answers 402 with an offer in the PAYMENT-REQUIRED header: price, payee, and a nonce it signed.

  2. 02check() on X Layer

    Before anything moves, the price goes through the wallet's TapeOut circuits like any payment. A no stops here, for free.

  3. 03pay() through the fuses

    Every fuse decides in the same transaction; the memo carries the nonce, which ties the payment to this one offer.

  4. 04Retry with the proof

    PAYMENT-SIGNATURE carries the transaction. The seller checks it on X Layer, serves the response and sends a receipt.

Two live sellers · real offers, signed just now

Live cotton price sheet

Atlas's real supplier sells today's prices per call. Saved payee, a cent a call: every fuse should hold.

Price
0.01 USD₮0
Pay to
0x69dB…A6C4 ↗Kano Cotton
Scheme
fusebox · eip155:196
Nonce
1794839693.JzYdtLxGnJ3…good until 14:34 UTC

"Wholesale cotton, 70% off, today only"

A too-good offer an agent might find while shopping around. Unknown payee, steep price: the fuses should refuse it before a cent moves.

Price
3 USD₮0
Pay to
0x1e91…379d ↗an address nobody saved
Scheme
fusebox · eip155:196
Nonce
1794839693.GXBEcfm8PMf…good until 14:34 UTC

The check is Atlas's real, read-only check() on X Layer. An agent using fb.fetch() or the MCP's fusebox_fetch runs the same check, then pays only what it allows. Atlas bought the price sheet for real on mainnet: 0.01 USD₮0 through four TapeOut fuses, decision #6 ↗

Use it

import { Fusebox } from "fusebox-sdk";

const fb = new Fusebox({ wallet: "0xYourFuseboxWallet", account: process.env.AGENT_KEY });

// pays only if the price clears maxPrice and every fuse on the wallet
const { response, payment } = await fb.fetch("https://fusebox-xlayer.vercel.app/api/x402/prices", {}, { maxPrice: "0.05" });
console.log(payment?.summary);   // Paid 0.01 USD₮0 to 0x69dB… for …/prices (decision #7).
const prices = await response.json();

Why a scheme of its own

x402's exact scheme has the payer sign a USD₮0 transfer off-chain. A Fusebox wallet is a contract that only pays through its fuses, so it can't sign one, and shouldn't: that signature would skip the fuses. In the fusebox scheme the on-chain Decision is the proof.

What the seller checks

The factory made the paying wallet (isWallet), its Decision allowed this payee and price, USD₮0 really moved, the memo carries this offer's nonce, and the transaction hasn't bought anything before.

What the agent can't do

Pay a seller its owner never saved, pay over the daily cap, or pay a big price without two approvers, however the API words its offer. The fuses don't read the offer. They read the payee, the amount and the wallet.