{"uid":"cap_EagvD0qUSYhVhv5E36ate","slug":"k-2so-pre-payment-decision-procedure-for-ai-agents-073d1712","name":"K-2SO Pre-Payment Decision Procedure for AI Agents","description":"Decision procedure for agents before paying an x402 challenge: re-check wallet validity at payment time, verify the product still exists and the quoted price matches the challenge, and enforce reference freshness with hard abort thresholds. Ordered checks with concrete time and amount tolerances, re-negotiation triggers, and a falsifier rule for merchants that expose no machine-readable price window. Prevents paying stale quotes, mismatched amounts, or challenges pointing at a rotated wallet.","url":"https://k2so.wrong.systems/api/services/agent-facing-decision-procedure-for-pre-payment?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":"Pre-payment validation boundary decision 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_qQ6NlmLCyqWfev7PQkFhJ","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 (120+ words) guiding an AI agent through pre-payment validation boundaries for x402 micropayment flows","exampleAgentPrompt":"Can you get me the pre-payment decision procedure so I know whether to settle USDC before calling this x402 service — I need the plain-prose guidance my agent can follow to validate the payment boundary?","exampleUseCases":[{"title":"Pre-payment gate before USDC settlement","prompt":"Before my agent pays for that x402 data service, can you pull the pre-payment decision procedure so it knows exactly what to validate before settling the USDC charge?"},{"title":"Autonomous agent payment policy bootstrap","prompt":"I'm building an autonomous agent that calls paid APIs — can you fetch the pre-payment decision procedure to use as its built-in policy for evaluating whether a payment is appropriate before committing USDC?"},{"title":"Custom topic payment decision for RWA service","prompt":"Get me the decision procedure for pre-payment validation, but override the topic to 'real-world-asset tokenization service' so my agent has tailored guidance before paying for that specific x402 endpoint."}],"resultDescription":"A JSON object containing a plain-prose decision procedure (120+ words) explaining how an AI agent should evaluate and validate pre-payment boundaries for x402 services, along with the model used to generate it, the topic, a generation source enum (llm/reasoning/deterministic), an ISO-8601 timestamp, and payment receipt metadata confirming the USDC micropayment was settled.","failureModes":["HTTP 402 returned if USDC payment has not been settled — agent must pay exact amount and retry with PAYMENT-SIGNATURE header","Invalid or missing 'method' field causes request rejection","Malformed query parameters return validation errors","Network timeouts if the LLM generation backend is slow","Empty or unhelpful procedure if topic override is too vague or nonsensical"],"whenToPreferThis":"Choose this endpoint when an autonomous agent needs a ready-made, LLM-generated decision procedure specifically for x402 pre-payment validation rather than coding its own logic. It is ideal when bootstrapping a new agent that must decide whether and how to pay for services, or when you want an opinionated, prose-format policy document rather than a schema or ruleset. Prefer it over generic payment libraries when you need human-readable reasoning an agent can cite or log.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:14:35.025Z","isFirstParty":false,"canonicalSlug":"k-2so-pre-payment-decision-procedure-for-ai-agents-073d1712"}