# SafeRoute Agent Payment Route

> SafeRoute Agent Payment Route 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-17).

Routes and executes x402 payments for AI agents on Base, producing a swap quote, payment intent, and receipt signature for USDC-based service payments.

## Facts

- Endpoint: POST https://api.usesaferoute.com/v1/agent-payment-route?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saferoute-agent-payment-route-f059f643
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O6E8wGwHd0E3DQGRaJWvF

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-agent-payment-route-f059f643 -d '<json body>'
```

Example prompt: Route an x402 payment for me on Base: I need to pay for resource at https://api.example.com/data, selling USDC (0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA) to buy USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) up to 1000000 units, sending to recipient 0xAbCd1234...5678, with payment ID pay_abc123xyz456def7 and intent ID intent_abc123xyz456def7 from agent source my-agent-v1.

## When to prefer this

Choose this endpoint when an AI agent needs to autonomously fulfill an x402 payment requirement on the Base network using USDC, especially when a token swap may be needed to source funds. It provides an all-in-one route: quote, payment intent, and signed receipt. Prefer it over raw blockchain transactions when you need payment protection, swap-backed funding, and a verifiable receipt in a single call.

## Known failure modes

- Invalid Ethereum address format for taker, recipient, sellToken, buyToken, or payTo — returns validation error
- Payment requirements missing required fields (scheme, network, asset, amount, payTo, maxTimeoutSeconds) — returns schema error
- maximumSellAmount insufficient to cover the payment — returns quote failure
- Deadline exceeds the requirement timeout — returns deadline error
- targetUsdcBalance exceeds active launch cap — returns cap exceeded error
- Network must be eip155:8453 (Base); other networks return unsupported network error
- paymentId or intentId too short (min 16 chars) or too long (max 128 chars) — returns validation error
- Downstream DEX liquidity insufficient for swap — returns no route found error

## 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 containing: a swap quote with pricing details, a payment intent for the Base transaction, buyer action instructions for completing the payment, and a receipt signature confirming the routed payment — all under a status field indicating success or failure.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "taker": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "buyToken": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "deadline": {
   "type": "string",
   "format": "date-time",
   "description": "Optional route deadline; defaults to the requirement timeout and cannot exceed it."
  },
  "intentId": {
   "type": "string",
   "pattern": "^[a-zA-Z0-9_-]+$",
   "maxLength": 128,
   "minLength": 16
  },
  "paymentId": {
   "type": "string",
   "pattern": "^[a-zA-Z0-9_-]+$",
   "maxLength": 128,
   "minLength": 16
  },
  "quoteMode": {
   "type": "string",
   "const": "exactBuy"
  },
  "recipient": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "sellToken": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "referralCode": {
   "type": "string",
   "pattern": "^[a-zA-Z0-9_-]+$",
   "maxLength": 64,
   "minLength": 3
  },
  "executionMode": {
   "type": "string",
   "const": "standard"
  },
  "sourceAgentId": {
   "type": "string",
   "maxLength": 128,
   "minLength": 1
  },
  "paymentResource": {
   "type": "object",
   "required": [
    "url"
   ],
   "properties": {
    "url": {
     "type": "string",
     "format": "uri",
     "pattern": "^https://"
    },
    "mimeType": {
     "type": "string",
     "maxLength": 128
    },
    "description": {
     "type": "string",
     "maxLength": 500
    }
   }
  },
  "maximumSellAmount": {
   "type": "string",
   "pattern": "^\\d+$"
  },
  "targetUsdcBalance": {
   "type": "string",
   "pattern": "^\\d+$",
   "description": "Optional post-funding Base USDC balance target. Must cover the current payment and stay within the active launch cap."
  },
  "paymentRequirements": {
   "type": "object",
   "required": [
    "scheme",
    "network",
    "asset",
    "amount",
    "payTo",
    "maxTimeoutSeconds"
   ],
   "properties": {
    "asset": {
     "type": "string",
     "pattern": "^0x[a-fA-F0-9]{40}$"
    },
    "extra": {
     "type": [
      "object",
      "null"
     ]
    },
    "payTo": {
     "type": "string",
     "pattern": "^0x[a-fA-F0-9]{40}$"
    },
    "amount": {
     "type": "string",
     "pattern": "^\\d+$"
    },
    "scheme": {
     "type": "string",
     "const": "exact"
    },
    "network": {
     "type": "string",
     "const": "eip155:8453"
    },
    "maxTimeoutSeconds": {
     "type": "integer",
     "maximum": 3600,
     "minimum": 1
    }
   },
   "additionalProperties": false
  }
 }

… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "quote": {},
  "status": "ok",
  "service": "safe_agent_payment_route",
  "quoteMode": "exactBuy",
  "buyerAction": {},
  "paymentIntent": {},
  "receiptSignature": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saferoute-agent-payment-route-f059f643/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)
