Markets open
Wholesale traders at a long desk, one pointing at the PacketExchange route table on a monitor as others work on laptops
x402 payments

Let your agentfund itself

An agent tops up its PacketExchange balance with one signed USDC payment on Base, then spends it on voice and SMS. No card on file, no account manager, no gas to hold.

How a payment clears

Three HTTP steps, about as long as a normal API call. An x402 client such as x402-fetch, or our MCP tool, runs all of them for you.

01

Request funding

Your agent calls POST /topups/x402 with the amount it wants to add. With no payment attached, the API answers HTTP 402 with the exact terms: network, USDC amount in atomic units, receiving address and the EIP-712 domain to sign.

02

Sign and retry

The wallet signs an EIP-3009 transferWithAuthorization for exactly those terms (the "exact" scheme), base64-encodes it into an X-PAYMENT header and retries the same request. No gas on your side: our relayer broadcasts it.

03

Settle and credit

We verify the signature, settle the USDC on-chain to our address and credit your balance through the same ledger as every other top-up. The response carries an X-PAYMENT-RESPONSE receipt with the transaction hash, and the agent can start sending traffic.

Top up in a few lines

Wrap fetch with an x402 helper and the 402, sign and retry steps happen on their own. The call returns once your balance is credited, with the settlement transaction hash. Agents on MCP can do the same through the MCP tool wmmn_topup_x402.

  • Built for agents
    An agent funds its own balance and starts sending voice and SMS without a card on file or a person approving each top-up.
  • USDC on Base
    Pay in USDC on Base mainnet. Your balance is credited in USD and behaves exactly like a card, crypto or wire top-up from then on.
  • No custody, no gas
    USDC moves straight from your wallet to our receiving address, and we never hold your keys. Our relayer broadcasts your signed authorization and pays the gas, so the wallet needs no ETH. The on-chain authorization nonce blocks replays.
agent funding - x402-fetch
import { wrapFetchWithPayment } from "x402-fetch";
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";

// Your agent's wallet: holds USDC on Base. No ETH needed, gas is covered for you.
const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY);
const wallet = createWalletClient({ account, chain: base, transport: http() });

// wrapFetchWithPayment auto-handles the 402 -> sign -> retry handshake
const fetchWithPay = wrapFetchWithPayment(fetch, wallet);

const res = await fetchWithPay("https://packetexchange.io/api/v1/topups/x402", {
  method: "POST",
  headers: { "Authorization": "Bearer wmmn_live_sk_...", "Content-Type": "application/json" },
  body: JSON.stringify({ amountUsd: 25 }),
});

console.log(await res.json()); // { status: "confirmed", txHash, newBalance, ... }

Good to know

Network. USDC on Base mainnet. Every 402 challenge names the network and the USDC contract, so your wallet always signs for the right chain.

For wallets and agents. x402 needs an on-chain wallet to sign, so it is a rail for software rather than a checkout page. People top up from the dashboard by card, crypto deposit or wire.

Same money, same rules. x402 credits the identical USD balance as every other method, with the same double-entry ledger, receipts and limits. Nothing about billing changes downstream.

Settlement. Our relayer broadcasts your signed authorization and covers the gas, so you never need ETH. USDC moves straight from your wallet to our receiving address; we never take custody of your private keys.