# Tollex x402 Payment Simulation

> Tollex x402 Payment Simulation is a paid API for AI agents from api.tollex.org, paid per call via x402, $0.0079/call, status unknown (last checked 2026-10-11).

Simulates an x402 micropayment for a given URL and payer address, validating payment requirements and returning a signed receipt without executing a real transaction

## Facts

- Endpoint: POST https://api.tollex.org/tools/x402_simulate_payment?utm_source=zero.xyz
- Price: $0.0079/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tollex-x402-payment-simulation-837b2e0d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lhZ1GS-Y7bNyh60YOuP--

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 tollex-x402-payment-simulation-837b2e0d -d '<json body>'
```

Example prompt: Before my agent actually pays, simulate an x402 USDC payment to https://merchant.example/v1/quote from wallet 0xAbCd1234abcd1234abcd1234abcd1234abcd1234 on Base and show me the signed receipt so I can confirm everything looks right.

## When to prefer this

Use this endpoint when an AI agent needs to preflight or dry-run an x402 micropayment before committing real funds — ideal for policy checks, debugging failed payment flows, or testing merchant compatibility. Prefer this over direct payment endpoints when you need a signed receipt for audit purposes without financial side effects, or when validating that payment parameters (asset, network, amount) align with a merchant's requirements before an agent autonomously purchases a capability.

## Known failure modes

- Invalid payer address format (must be 0x-prefixed 40-char hex) returns a validation error
- Merchant URL returns no x402 payment requirements or is unreachable
- Payment amount or asset in requirements object does not match merchant expectations
- Network mismatch between specified network and merchant's accepted networks
- Timeout exceeded when fetching payment requirements from merchant URL
- Malformed requirements object causes schema validation failure

## How this service works

Tollex lets software agents buy APIs and tools under rules you set: it finds a capability that fits, checks your policy before anything is signed, pays with x402 in USDC on Base or USDG on Robinhood Chain, reconciles uncertain payments and returns a signed receipt.

## Output

Returns a simulated payment outcome including validated payment requirements, reconciliation status, and a signed receipt — without debiting any real funds. Includes details such as the asset, amount, scheme, network, and whether the payment simulation succeeded or encountered a policy or parameter mismatch.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "pattern": "^https?://",
   "examples": [
    "https://merchant.example/v1/quote"
   ],
   "maxLength": 2048
  },
  "payer": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$"
  },
  "requirements": {
   "type": "object",
   "properties": {
    "asset": {
     "type": "string"
    },
    "payTo": {
     "type": "string"
    },
    "amount": {
     "type": "string"
    },
    "scheme": {
     "type": "string"
    },
    "network": {
     "type": "string"
    },
    "maxTimeoutSeconds": {
     "type": "integer"
    }
   },
   "additionalProperties": true
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "tool": {
   "id": "x402_simulate_payment",
   "version": "1.0.0",
   "provider": "tollex.robinhood-chain"
  },
  "result": {
   "payer": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
   "results": [
    {
     "amount": "7800",
     "scheme": "exact",
     "reasons": [],
     "wouldSucceed": true
    }
   ],
   "gasSponsoredApprovalOffered": false
  },
  "evidence": [],
  "untrustedOutput": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tollex-x402-payment-simulation-837b2e0d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tollex.org](https://www.zero.xyz/host/api.tollex.org/llms.txt)
