Transaction receipt (decoded transfers)
POST /api/tx-receiptFull receipt for a transaction hash in one call: status, block, from/to, value, gas used vs limit, effective gas price, total fee, tx type, calldata selector, contract created, plus every ERC-20 / ERC-721 / ERC-1155 Transfer event decoded locally from the logs (token, from, to, amount, tokenId) and the list of contracts that emitted logs. Send POST /api/tx-receipt with the required field hash and pay $0.003 per call over x402 or MPP (there is no free tier). It returns a JSON object with network, chainId, hash, status, blockNumber and 22 more.
Receipt and transaction are fetched in a single batched request. 404 (not charged) when the hash is unknown on that chain; a seen-but-unmined tx answers with status pending.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hash | string | yes | 0x-prefixed 32-byte transaction hash. Also accepted as tx, txid, txHash, tx_hash, transaction, signature. |
network | string | no | ethereum / base / polygon / arbitrum / optimism (default ethereum). |
Example request
curl -i -X POST https://agent402.tools/api/tx-receipt \
-H "Content-Type: application/json" \
-d '{"hash":"0x214b3526ee64f7eabfc94ea536b8680bd95a2da634ebf5149aea189d311be56b","network":"ethereum"}'
Without payment this returns HTTP 402 Payment Required with the exact price for tx-receipt; any x402 v2 or MPP client pays it and retries.
Example response
{
"network": "ethereum",
"chainId": 1,
"hash": "0x214b3526ee64f7eabfc94ea536b8680bd95a2da634ebf5149aea189d311be56b",
"status": "success",
"blockNumber": 25563191,
"blockHash": "0x8e12…1243",
"transactionIndex": 128,
"timestamp": "2026-07-19T00:32:23.000Z",
"from": "0xa916…6081",
"to": "0xa0b8…eb48",
"contractAddress": null,
"nonce": 873,
"type": "0x2",
"value": "0",
"valueWei": "0",
"gasUsed": "45148",
"gasLimit": "54633",
"effectiveGasPriceGwei": 0.040610326,
"feeWei": "1833474998248",
"feeNative": "0.000001833474998248",
"selector": "0xa9059cbb",
"inputBytes": 68,
"logCount": 1,
"contractsTouched": [
"0xa0b8…eb48"
],
"transfers": [
{
"standard": "erc20",
"contract": "0xa0b8…eb48",
"from": "0xa916…6081",
"to": "0xd8da…6045",
"rawValue": "420000",
"tokenId": null,
"logIndex": 413
}
],
"source": "alchemy",
"fetchedAt": "2026-08-22T12:00:00.000Z"
}
| Field | Type | Always present | In the example |
|---|---|---|---|
network | string | yes | ethereum |
chainId | number | yes | 1 |
hash | string | yes | 0x214b3526ee64f7eabfc94ea536b8680bd95a2da634ebf5149aea189d311be56b |
status | string | yes | success |
blockNumber | number | yes | 25563191 |
blockHash | string | yes | 0x8e12…1243 |
transactionIndex | number | yes | 128 |
timestamp | string | yes | 2026-07-19T00:32:23.000Z |
from | string | yes | 0xa916…6081 |
to | string | yes | 0xa0b8…eb48 |
contractAddress | null | no | null |
nonce | number | yes | 873 |
type | string | yes | 0x2 |
value | string | yes | 0 |
valueWei | string | yes | 0 |
gasUsed | string | yes | 45148 |
gasLimit | string | yes | 54633 |
effectiveGasPriceGwei | number | yes | 0.040610326 |
feeWei | string | yes | 1833474998248 |
feeNative | string | yes | 0.000001833474998248 |
selector | string | yes | 0xa9059cbb |
inputBytes | number | yes | 68 |
logCount | number | yes | 1 |
contractsTouched | array of string | yes | 1 item in the example |
transfers | array of objects | yes | 1 item in the example |
source | string | yes | alchemy |
fetchedAt | string | yes | 2026-08-22T12:00:00.000Z |
From an MCP client
catalog.call {
"slug": "tx-receipt",
"params": {
"hash": "0x214b3526ee64f7eabfc94ea536b8680bd95a2da634ebf5149aea189d311be56b",
"network": "ethereum"
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for tx-receipt; 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. - A
GETorHEADto /api/tx-receipt returns the same 402 quote, so the price can be read without a body. - 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/tx-receipt", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"hash": "0x214b3526ee64f7eabfc94ea536b8680bd95a2da634ebf5149aea189d311be56b",
"network": "ethereum"
}),
});
Related tools
Wallet token transfers (filtered)
POST /api/asset-transfersRecent token transfers for a wallet on Base, Ethereum and other EVM chains, newest first. Filtered transfer log for an E…
Block receipts (one block, summarised)
POST /api/block-receiptsEvery transaction receipt in one block, fetched as a single upstream read and summarised: tx count, succeeded vs failed,…
Multi-chain EVM RPC (read-only)
POST /api/evm-rpcRead-only JSON-RPC against Ethereum, Base, Polygon, Arbitrum, or Optimism with built-in multi-endpoint failover - one pa…
Gas snapshot (slow / standard / fast)
POST /api/gas-snapshotLive gas price snapshot for a chain - slow / standard / fast tiers in gwei, plus the latest base fee. Sampled from eth_f…
Token balances (named contracts)
POST /api/token-balancesERC-20 balances of one wallet for a NAMED list of token contracts (1-20) - the targeted complement to the full-portfolio…
Transaction simulation (eth_call + gas)
POST /api/tx-simulateDry-run a prospective smart-contract call or transaction without broadcasting it: executes eth_call and eth_estimateGas …