{"uid":"cap_D-aiRj4NvxjhRYjtJzioO","slug":"xh-agents-how-to-build-an-x402-paid-endpoint-e32e667c","name":"XH Agents — How-To: Build an x402 Paid Endpoint","description":"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.","url":"https://xhagents.xyz/api/howto/create-x402-endpoint?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"}}}}},"responseSchema":{"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"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.3","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.3/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.3","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.3","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Pok1uDWI2y5D1tLP3vUQv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.3","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"First x402 endpoint from scratch","prompt":"I want to monetize my HTTP API so AI agents can pay me in USDC. Can you pull up the full x402 endpoint setup guide — I need the payment gate, verifier rules, per-route pricing, and nginx config?"},{"title":"Passing the x402 validator","prompt":"My x402 endpoint keeps failing the validator checks. Can you get me the step-by-step recipe that explains the verifier rules and what the validator actually expects so I can fix my implementation?"},{"title":"Avoiding real-USDC payment bugs","prompt":"I'm about to go live with real USDC on my x402 endpoint and I'm worried about concurrency traps and money-path bugs. Can you fetch the XH Agents guide on building a production x402 endpoint so I know what pitfalls to watch for?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T18:36:58.756Z","isFirstParty":false,"canonicalSlug":"xh-agents-how-to-build-an-x402-paid-endpoint-e32e667c"}