{"author":"Mart","cache_hit":false,"date":"2026-09-26","extract_ms":24,"fetch_ms":242,"final_url":"https://mart402.com/samples/assets/article.html","lang":null,"markdown":"# How an AI agent pays for an API call with x402\n\nThis page is a sample asset. It exists so that the example requests in our documentation work exactly as written: an agent that copies the example and pays for it gets real, useful content back instead of an error.\n\n## The four steps\n\nFirst, the agent sends an ordinary HTTP request to a paid endpoint without any payment. The server answers with HTTP 402 Payment Required and a machine-readable body that states the price, the asset (USDC), the network (Base) and the recipient address. Nothing has been charged at this point, so inspecting the term\n... (truncated in sample; full text returned on paid calls)","method":"fast","note":"SAMPLE RESPONSE recorded from a real run of the production engine on the self-hosted sample asset (deterministic product: same input gives this output). Served free at /samples/{product}. No payment was taken.","ok":true,"reason":"","receipt_id":"rcpt_... (issued on every paid call; re-fetch free at GET /v1/receipts/{id})","sample":true,"sample_input":{"mode":"fast","url":"https://mart402.com/samples/assets/article.html"},"status":200,"text_len":1654,"title":"How an AI agent pays for an API call with x402","url":"https://mart402.com/samples/assets/article.html"}