Verify x402 settlement
GET /api/x402-verify · Cached 1dConfirm a USDC payment actually settled: given a tx hash (and network), returns whether it succeeded and the USDC transfers it contains (from, to, amount). Send GET /api/x402-verify with the required field hash and pay $0.004 per call over x402 or MPP (there is no free tier). It returns a JSON object with hash, network, settled, status, transfers and 1 more.
Optionally check it paid a specific address at least a minimum amount. Read-only proof of payment. ?hash=0x…&network=base&to=0x…&min=0.001
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hash | string | yes | 0x transaction hash Also accepted as tx, txid, txHash, tx_hash, transaction, signature. |
network | string | no | chain: base | polygon | arbitrum | optimism | ethereum | monad | celo | avalanche | sei | robinhood (default base) |
to | string | no | optional: expected recipient address to check |
min | number | no | optional: minimum USDC expected to that recipient |
Example request
curl -i "https://agent402.tools/api/x402-verify?hash=0x09f85fcf1844d85277b8cce528efc8d25c6df632b1fed1c8337f078901a69562&network=base&min=0.001"
Without payment this returns HTTP 402 Payment Required with the exact price for x402-verify; any x402 v2 or MPP client pays it and retries.
Example response
{
"hash": "0x09f85fcf1844d85277b8cce528efc8d25c6df632b1fed1c8337f078901a69562",
"network": "base",
"settled": true,
"status": "success",
"transfers": [
{
"from": "0x…",
"to": "0x…",
"usdc": "0.01"
}
],
"matched": true
}
| Field | Type | Always present | In the example |
|---|---|---|---|
hash | string | no | 0x09f85fcf1844d85277b8cce528efc8d25c6df632b1fed1c8337f078901a69562 |
network | string | no | base |
settled | boolean | no | true |
status | string | no | success |
transfers | array of objects | no | 1 item in the example |
matched | boolean | no | true |
From an MCP client
catalog.call {
"slug": "x402-verify",
"params": {
"hash": "0x09f85fcf1844d85277b8cce528efc8d25c6df632b1fed1c8337f078901a69562",
"network": "base",
"min": 0.001
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for x402-verify; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.
Errors and behavior
hashis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement is cancelled when the tool fails. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - Cached: an identical request within 1d is answered from cache with
X-Cache: hit. - A
POSTwith a JSON body to /api/x402-verify is served as this GET, with the body as the input. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/x402-verify?hash=0x09f85fcf1844d85277b8cce528efc8d25c6df632b1fed1c8337f078901a69562&network=base&min=0.001");
Related tools
Build USDC transfer authorization
POST /api/transfer-authorizationBuild the EIP-3009 transferWithAuthorization typed data for a gasless USDC transfer on Base/Polygon/Arbitrum/Optimism/Et…
Rate a call you paid for
POST /api/feedbackTell this server whether a call you paid for delivered what it promised. Bound to the receipt: give it the settlement tr…
Transaction status
GET /api/tx-statusCheck the confirmation status of a transaction by hash on Base/Polygon/Arbitrum/Optimism/Ethereum/Monad/Celo/Avalanche/S…
USDC balance
GET /api/usdc-balanceRead the USDC balance of any address on Base, Polygon, Arbitrum, Optimism, Ethereum, Monad, Celo, Avalanche, or Sei. Rea…
x402 seller dossier
POST /api/seller-dossierEverything Agent402 knows about one x402 seller origin, in one read: identity and crawl history, the catalog with the pr…
x402 seller payability check
POST /api/seller-payabilityBuy one call from an x402 seller endpoint right now and report exactly what happened: the unpaid call's status, the 402 …