# SafeRoute Post-Transaction Verification

> SafeRoute Post-Transaction Verification is a paid API for AI agents from api.usesaferoute.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-20).

Verifies and audits a completed Base DEX token swap transaction against the original swap intent, confirming execution correctness and payment safety.

## Facts

- Endpoint: POST https://api.usesaferoute.com/v1/post-tx-verify?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saferoute-post-transaction-verification-1d7782c4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PPM-WMGjKQ9X6i5G4QwjB

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 saferoute-post-transaction-verification-1d7782c4 -d '<json body>'
```

Example prompt: Can you verify that my USDC-to-WETH swap actually executed correctly? The transaction hash is 0xabc123...def456, my intent ID is swap-agent-20240601-xyz99, and the original intent was to sell 500 USDC for at least 0.19 WETH from address 0xSenderAddress to 0xRecipientAddress.

## When to prefer this

Use this endpoint after executing a Base DEX token swap to confirm the transaction settled correctly against the original swap intent. Prefer this over generic blockchain explorers when you need structured, intent-aware verification that checks sell/buy tokens, amounts, addresses, and calldata hash in a single call. Ideal for AI agents that execute DeFi swaps autonomously and need programmatic post-trade confirmation before proceeding with downstream logic.

## Known failure modes

- Invalid or malformed transaction hash returns validation error
- Mismatched intent parameters (wrong tokens, amounts, or addresses) may return failed verification status
- Intent ID not found or expired causes lookup failure
- Transaction not yet confirmed on-chain may return pending or not-found error
- Payment of 0.05 USDC required; missing payment header causes 402 response
- Invalid sender or recipient Ethereum address format rejected by schema

## How this service works

Workflow automation, Stripe and API integration repair, and x402 payment diagnostics. Choose a fixed scope and review it before payment.

## Output

Returns a JSON object with a status field (e.g. 'ok') and a service identifier confirming the post-transaction verification completed. Indicates whether the executed transaction matches the original swap intent parameters including tokens, amounts, addresses, and calldata.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "intent": {
   "type": "object",
   "required": [
    "sender",
    "recipient",
    "sellToken",
    "buyToken",
    "sellAmount",
    "minimumBuyAmount"
   ],
   "properties": {
    "sender": {
     "type": "string",
     "pattern": "^0x[a-fA-F0-9]{40}$"
    },
    "buyToken": {
     "enum": [
      "USDC",
      "WETH",
      "EURC",
      "CBETH",
      "CBBTC",
      "VIRTUAL",
      "AERO"
     ],
     "type": "string"
    },
    "recipient": {
     "type": "string",
     "pattern": "^0x[a-fA-F0-9]{40}$"
    },
    "sellToken": {
     "enum": [
      "USDC",
      "WETH",
      "EURC",
      "CBETH",
      "CBBTC",
      "VIRTUAL",
      "AERO"
     ],
     "type": "string"
    },
    "sellAmount": {
     "type": "string",
     "pattern": "^\\d+(?:\\.\\d+)?$"
    },
    "expectedTarget": {
     "type": "string",
     "pattern": "^0x[a-fA-F0-9]{40}$"
    },
    "minimumBuyAmount": {
     "type": "string",
     "pattern": "^\\d+(?:\\.\\d+)?$"
    },
    "expectedBuyAmount": {
     "type": "string",
     "pattern": "^\\d+(?:\\.\\d+)?$"
    },
    "expectedCalldataHash": {
     "type": "string",
     "pattern": "^0x[a-fA-F0-9]{64}$"
    }
   },
   "additionalProperties": false
  },
  "intentId": {
   "type": "string",
   "pattern": "^[a-zA-Z0-9_-]+$",
   "maxLength": 128,
   "minLength": 16
  },
  "referralCode": {
   "type": "string",
   "pattern": "^[a-zA-Z0-9_-]+$",
   "maxLength": 64,
   "minLength": 3
  },
  "sourceAgentId": {
   "type": "string",
   "maxLength": 128,
   "minLength": 1
  },
  "transactionHash": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{64}$"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "ok",
  "service": "safe_post_tx_verify"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saferoute-post-transaction-verification-1d7782c4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.usesaferoute.com](https://www.zero.xyz/host/api.usesaferoute.com/llms.txt)
