{"uid":"cap_4D7nIXSPAxIQg-iLP8mMi","slug":"k-2so-x402-agent-checkout-url-handling-and-settlement-decision-88a57b0b","name":"K-2SO x402 Agent Checkout URL Handling and Settlement Decision Procedure","description":"agent checkout x402_url handling and settlement verification procedure: Coinbase","url":"https://k2so.wrong.systems/api/services/agent-checkout-x402-url-handling-and-settlement","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 checkout x402_url handling and settlement verification procedure: Coinbase 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":"down","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_vNfhwigE6dAELbrxLHQ82","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 plain-prose decision procedure guiding AI agents through the full x402 payment flow: detecting HTTP 402, parsing PAYMENT-REQUIRED headers, settling exact USDC, and retrying with PAYMENT-SIGNATURE.","exampleAgentPrompt":"Walk me through the full decision procedure for handling x402 URL payments — detecting the 402 response, settling USDC, and retrying with the payment signature — so I know exactly what steps to follow as an autonomous agent.","exampleUseCases":[{"title":"First-time x402 agent integration","prompt":"I'm building an AI agent that needs to call paid x402 APIs on Base — give me the decision procedure for detecting a 402, paying the exact USDC amount, and retrying with the payment signature so I can implement it correctly."},{"title":"Debugging a failed x402 payment retry","prompt":"My agent is getting 402 errors even after it thinks it settled — can you give me the step-by-step decision procedure for x402 URL handling and settlement verification so I can figure out where it's going wrong?"},{"title":"Teaching a new agent the x402 checkout flow","prompt":"I need to train a new agent on the x402 checkout protocol — fetch the decision procedure that covers how to handle payment-required responses, settle USDC on Base, and confirm the settlement before retrying the original request."}],"resultDescription":"A JSON object containing a plain-prose decision procedure (120+ words) describing exactly how an AI agent should handle x402 HTTP 402 responses, settle USDC payment on Base, and retry with the payment signature. Includes the service slug, model used to generate the procedure, generation source (llm/reasoning/deterministic), ISO-8601 timestamp, and payment metadata confirming the $0.002 USDC transaction.","failureModes":["HTTP 402 returned before payment — agent must pay 0.002 USDC and retry with PAYMENT-SIGNATURE header","Missing or malformed PAYMENT-SIGNATURE causes repeated 402 without settlement","Invalid 'method' enum value (not GET/HEAD/DELETE) results in schema validation error","Network or provider downtime on k2so.wrong.systems returns 5xx error","Requesting meta=1 returns free metadata JSON instead of the paid decision procedure — no content if expecting paid result"],"whenToPreferThis":"Choose this endpoint when an AI agent needs authoritative, up-to-date prose guidance on the exact x402 checkout flow — specifically URL-level 402 detection, USDC settlement, and payment-signature retry sequencing. Prefer this over generic documentation when the agent needs machine-consumable decision procedure text it can act on directly, or when building/debugging x402 payment flows on Base in USDC.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:28:12.027Z","isFirstParty":false}