Pay per call over x402: a curl, a 402, and a paid retry
Every payable WAVE route answers an unpaid request with HTTP 402 and a machine-readable price. This is the exact exchange, from the first curl to the paid retry, against a route that is live today.
An agent does not need an account to use WAVE. It needs to read one status code. Every payable route answers an unpaid request with 402 Payment Required, a price, and the terms to settle it. The agent pays on Base, retries with proof, and gets the result. This post runs that exchange against a route that is live today, with the real responses.
What shipped
The x402 facilitator is public and discoverable. One GET tells an agent where to settle and on which networks:
curl -s https://api.wave.online/.well-known/x402
{
"facilitator": "https://gateway.wave.online/v1/x402/facilitator",
"scheme": "exact",
"version": "x402@1",
"networks": [
{ "networkId": "eip155:8453", "asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913" },
{ "networkId": "eip155:84532", "asset": "0x036cbd53842c5426634e7929541ec2318f3dcf7e" }
]
}
eip155:8453 is Base mainnet and eip155:84532 is Base Sepolia for testing. The asset on each is USDC. The scheme is exact: the server names a fixed amount, and the agent pays that amount and no more.
Step 1: the unpaid call
The Dispatch Engine's routing decision is one of the 175 payable routes. Call it with no key and no payment:
curl -si -X POST https://dispatch.wave.online/v1/route \
-H 'content-type: application/json' \
-d '{"prompt":"Summarize this paragraph in one line."}'
HTTP/2 402 content-type: application/json www-authenticate: Payment id="chal_exact_da1e2eb23d4f4833", realm="dispatch.wave.online", method="x402", intent="charge", request="eyJhbW91bnQiOiIxMDAwIi...", expires="2026-09-02T03:44:12.556Z"
{
"x402Version": 1,
"error": "payment required",
"accepts": [
{
"scheme": "exact",
"protocol": "x402",
"network": "base",
"maxAmountRequired": "1000",
"resource": "/v1/route",
"description": "dispatch routing decision",
"payTo": "0x7543c839B9a96d1305d3A85464a5C6b0Cfcac406",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"maxTimeoutSeconds": 60,
"extra": { "settlement": "verified-via-facilitator" }
}
]
}
Read the body. accepts[0] is the offer: pay 1000 base units of the named asset (USDC on Base) to payTo, within 60 seconds, for the resource /v1/route. The www-authenticate header carries the same challenge with an id and an expiry, so a client that reads headers and a client that reads bodies both get it. The full response lists further payment methods after the x402 entry; an agent picks the one it can settle.
Step 2: settle
The agent signs a transfer of 1000 units of the asset to payTo on Base under the exact scheme and encodes the signed payment as the x402 payment payload. Any x402 client library does this step. The facilitator at gateway.wave.online/v1/x402/facilitator verifies and settles it. Nothing here is WAVE-specific: it is the x402 protocol, version 1.
Step 3: the paid retry
Repeat the call with the payment attached:
curl -si -X POST https://dispatch.wave.online/v1/route \
-H 'content-type: application/json' \
-H "X-PAYMENT: $PAYMENT_PAYLOAD" \
-d '{"prompt":"Summarize this paragraph in one line."}'
The gateway hands the payload to the facilitator, the facilitator verifies it against the challenge, settlement is recorded, and the request runs. The response is 200 with the routing decision, and the meter records one decision against the payer. The paid retry costs 1000 base units and nothing else: no minimum, no subscription, no account created as a side effect.
What it means
The payment is part of the protocol, not a side channel. There is no checkout page to drive, no card to store, no key to provision before the first call. An agent that can read JSON and sign a transfer can use every payable route on WAVE without a person in the loop.
A person is not on a different path. The same POST /v1/route accepts authorization: Bearer <key> and bills the account behind it. The route, the enforcement, and the metering are shared; only the payer changes.
The amount is the amount. scheme: exact means the server states a price and the agent pays that price, so a budget is enforceable in code before anything is signed. Read maxAmountRequired, compare, decide.
Challenges expire. The header carries an id and an expires timestamp, and accepts[0] carries maxTimeoutSeconds: 60. A payment settled against a stale challenge is refused, so a client keeps the 402 it received and settles promptly; if the window closes, it sends the unpaid call again and reads a fresh challenge. Idempotency lives in the challenge id, not in the request body.
Testing costs nothing on mainnet. The discovery document lists Base Sepolia (eip155:84532) with test USDC. Run the whole exchange there before a mainnet wallet is involved.
How to use it
GET https://api.wave.online/.well-known/x402and cache the facilitator and the networks.- Call the route you want. On
402, parseaccepts[]and pick the entry withprotocol: "x402". - Check
maxAmountRequiredagainst your budget. Settle with an x402 client on the named network. - Retry with
X-PAYMENT. On200, the response is the product.
Every payable route is listed with its scope at gateway.wave.online/.well-known/wave-skills.json. Pick one, send the unpaid call, and read the price.