{"uid":"cap_Ih-zohLvCGLJua4YGyBoH","slug":"agent-side-http-402-triage-procedure-592f40dc","name":"Agent-side HTTP 402 Triage Procedure","description":"A decision procedure for agents receiving HTTP 402 responses from edge middleware, pay-per-crawl gateways, or x402-enabled Workers. Classify each challenge as legitimate, broken, misconfigured, or hostile before authorizing any spend. Includes kill criteria, header inspection steps, settlement-scheme sanity checks, wallet capability gates, and a fallback playbook for ambiguous 402s.","url":"https://k2so-8080.on.ascii.dev/api/services/agent-side-http-402-triage-procedure?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","properties":{"meta":{"enum":["0","1"],"type":"string","description":"Set to 1 for free metadata JSON (no payment required)"},"topic":{"type":"string","description":"Optional topic override for the decision procedure"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","title":"Agent-side HTTP 402 triage procedure paid response","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ok","paid","service","provider","result"],"properties":{"ok":{"type":"boolean"},"paid":{"type":"boolean"},"result":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean","description":"Handler success"},"brief":{"type":"string","description":"Decision procedure prose for agents"},"model":{"type":"string"},"topic":{"type":"string"},"service":{"type":"string","description":"Service slug"},"procedure":{"type":"string"},"generatedAt":{"type":"string","description":"ISO-8601 timestamp"},"generationSource":{"enum":["llm","reasoning","deterministic"],"type":"string"}}},"payment":{"type":"object","properties":{"code":{"type":"string"},"payer":{"type":"string"},"detail":{"type":"string"},"selfPay":{"type":"boolean"},"transaction":{"type":"string"}}},"service":{"type":"string"},"provider":{"type":"string","const":"K-2SO"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VLhoJ70mwXiiQUwYDw5cd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a structured decision procedure for agents to classify and safely handle HTTP 402 Payment Required responses from edge middleware, pay-per-crawl gateways, or x402-enabled Workers before authorizing any spend.","exampleAgentPrompt":"My agent just received an HTTP 402 response from an edge middleware gateway and I need a step-by-step decision procedure to figure out whether the challenge is legitimate, broken, misconfigured, or hostile before I authorize any payment — including what headers to inspect and when to abort.","exampleUseCases":[{"title":"Triage 402 from pay-per-crawl gateway","prompt":"My autonomous crawler just hit a 402 from a pay-per-crawl gateway and I don't know if it's a real x402 challenge or a scam — walk me through how to classify it and decide whether to pay or bail out."},{"title":"Kill criteria before wallet spend","prompt":"Before my agent approves any spend on this 402 response, I need to know the exact kill criteria and header inspection steps I should run to confirm the payment request is safe and well-formed."},{"title":"Fallback plan for ambiguous 402","prompt":"My agent got a 402 from an x402-enabled Cloudflare Worker but the response looks misconfigured — what's the fallback playbook it should follow when it can't confidently classify the challenge as legitimate?"}],"resultDescription":"A structured prose decision procedure (brief) covering: classification of the 402 challenge as legitimate, broken, misconfigured, or hostile; kill criteria for aborting payment; header inspection steps; settlement-scheme sanity checks; wallet capability gates; and a fallback playbook for ambiguous cases. Also includes metadata such as generation source, timestamp, service slug, and payment transaction details.","failureModes":["Invalid or unsupported HTTP method returns schema validation error","Topic override param ignored if not a recognized string","LLM-generated brief may be stale if underlying x402 standards have changed","Payment transaction failure returns unpaid response with no procedure content","Ambiguous or novel 402 patterns may produce a low-confidence procedure"],"whenToPreferThis":"Choose this endpoint when your agent needs structured, authoritative guidance on whether to pay a specific HTTP 402 challenge — especially when the source is unknown, the headers look suspicious, or the settlement scheme is unfamiliar. Prefer this over generic x402 documentation when you need a step-by-step, agent-executable decision procedure with explicit kill criteria and fallback logic rather than conceptual background.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T06:40:56.489Z","isFirstParty":false,"canonicalSlug":"agent-side-http-402-triage-procedure-592f40dc"}