# OnchainExpat x402 Transaction Decoder

> OnchainExpat x402 Transaction Decoder is a paid API for AI agents from x402.onchainexpat.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Decodes and parses raw blockchain transaction data into human-readable structured information

## Facts

- Endpoint: POST https://x402.onchainexpat.com/api/x402-crypto/transaction-decoder
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchainexpat-x402-transaction-decoder-96178dc7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HWMSQjcMB3OucB0t__Mxx

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability onchainexpat-x402-transaction-decoder-96178dc7 -d '<json body>'
```

Example prompt: Can you decode this raw blockchain transaction for me and tell me what it's doing — who sent it, who received it, the value transferred, and any contract function calls: 0x02f8748201...?

## When to prefer this

Use this endpoint when you have a raw or hex-encoded blockchain transaction and need to programmatically extract its human-readable fields — sender, receiver, value, contract calls — without running a full node. Ideal for agents building transaction explorers, DeFi audit tools, or any workflow that needs to interpret on-chain activity from raw data.

## Known failure modes

- Invalid or malformed transaction hex returns a 400 error
- Unsupported chain or transaction format not recognized
- Payment not received via x402 protocol results in 402 Payment Required
- Empty or missing transaction input body
- Transaction data too large or truncated causing partial decode failure

## How this service works

Pay-per-request AI, crypto, proxy, and utility APIs using x402 protocol

## Output

A structured JSON object containing decoded transaction fields such as sender, recipient, value, gas, nonce, input data interpretation, and any smart contract function selectors or parameters extracted from the raw transaction

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "tx_hash"
 ],
 "properties": {
  "chain": {
   "type": "string",
   "description": "Blockchain (default: ethereum)"
  },
  "tx_hash": {
   "type": "string",
   "description": "Transaction hash (0x + 64 hex chars)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "object",
   "properties": {
    "chain": {
     "type": "string"
    },
    "decoded": {
     "type": "object",
     "description": "Decoded function call with method name and parameters"
    },
    "tx_hash": {
     "type": "string"
    },
    "transaction": {
     "type": "object",
     "description": "Basic transaction details: from, to, value, gas"
    },
    "explorer_url": {
     "type": "string",
     "description": "Link to view transaction on block explorer"
    },
    "ai_explanation": {
     "type": "string",
     "description": "Human-readable explanation of what the transaction did"
    },
    "token_transfers": {
     "type": "array",
     "description": "List of token transfers in this transaction"
    }
   }
  },
  "success": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchainexpat-x402-transaction-decoder-96178dc7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.onchainexpat.com](https://www.zero.xyz/host/x402.onchainexpat.com/llms.txt)
