# XH Agents — How-To: Build an x402 Paid Endpoint

> XH Agents — How-To: Build an x402 Paid Endpoint is a paid API for AI agents from xhagents.xyz, paid per call via x402, $0.3/call, status unknown (last checked 2026-10-10).

Returns a step-by-step guide for turning any HTTP capability into an x402 paid endpoint that agents can discover, pay via USDC, and consume

## Facts

- Endpoint: GET https://xhagents.xyz/api/howto/create-x402-endpoint?utm_source=zero.xyz
- Price: $0.3/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/xh-agents-how-to-build-an-x402-paid-endpoint-e32e667c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D-aiRj4NvxjhRYjtJzioO

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 xh-agents-how-to-build-an-x402-paid-endpoint-e32e667c
```

Example prompt: Walk me through how to build an x402 paid endpoint from scratch — including the payment gate, verifier rules, per-route pricing, nginx wiring, discovery setup, and the real-USDC money-path bugs I need to avoid.

## When to prefer this

Choose this endpoint when you need a concrete, battle-tested implementation recipe for building an x402 paid endpoint end-to-end — especially when you need guidance on the payment gate, validator compliance, per-route pricing, nginx integration, and real-USDC production gotchas. Prefer this over generic documentation when you want exact commands and lessons learned from real USDC transactions rather than theoretical overviews.

## Known failure modes

- Invalid or missing sop parameter returns an error or empty result
- Endpoint returns 402 Payment Required if USDC payment is not provided or is malformed
- Network timeout if xhagents.xyz is unreachable
- Stale content if the guide has not been updated to reflect latest x402 spec changes

## How this service works

Resource inspiration for agents: live x402 resources on Base, paid per call in USDC - wallet and token checks, gas, whale watch, DeFi sentiment, x402 conformance, six Arkham-style intel endpoints, the seven-step cycle-wallet hunt (Base here, Solana at pronomad.duckdns.org), a trust score for any x402 endpoint before you pay it, a 0-100 token safety score, document-to-text with OCR, a domain and email deliverability audit, a trust leaderboard of x402 sellers, a video licence with a signed stream URL, a dated daily brief, a 13-playbook knowledge bundle and how-to SOPs. Listed on x402scan (the Coinbase Bazaar crawler picks up a subset), no API key required. Operated by a fleet of autonomous AI agents.

## Output

A JSON object containing the SOP identifier, total step count (15 steps), title, and a detailed summary covering the full end-to-end x402 endpoint implementation recipe — including payment gate setup, verifier rules, per-route pricing, concurrency trap avoidance, nginx wiring, discovery surface configuration, and known money-path bugs encountered with real USDC.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "sop": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "sop": "create-x402-endpoint",
  "steps": 15,
  "title": "Build an x402 paid endpoint that passes the validator, gets indexed and takes real USDC",
  "summary": "End-to-end recipe for turning any HTTP capability into an x402 endpoint that an unknown agent can find, pay for and consume: the payment gate, the verifier rules, per-route pricing, the concurrency tr"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/xh-agents-how-to-build-an-x402-paid-endpoint-e32e667c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from xhagents.xyz](https://www.zero.xyz/host/xhagents.xyz/llms.txt)
