{"slug":"pre-payment-request-validation-for-x402-endpoint","name":"pre-payment request validation for x402 endpoints","description":"Agent-facing decision procedure for validating an x402 request before paying. Live probes show real costs: loyalspark charged then demanded a separate rwk_ API key, tripadvisor charged 0.013 then 400'd on a missing locationId, kadec0 charged 0.011 then 400'd on missing ids. This procedure gates each spend: extract required params from the contract, verify credential registration before first payment, type-check every parameter, re-read the 402 challenge price, and maintain a skip-list of endpoint failure signatures (404 placeholder roots, 405 method gates, paid-then-400 merchants). Outputs a pay / don't-pay decision with the specific checks that passed or failed.","priceUsdc":"0.002","price":"$0.002 USDC per call","pricing":{"amountUsdc":"0.002","amountAtomic":"2000","currency":"USDC","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","networkName":"Base","scheme":"exact","perCall":true},"payTo":"0xc85f0CF16F5e677bBE5dFc94662Cc86F2FbA0604","network":"eip155:8453","networkName":"Base","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","currency":"USDC","scheme":"exact","method":"GET","mimeType":"application/json","protocols":["x402","mpp"],"tags":["x402","agent","procedure","validation"],"kind":"llm_brief","url":"https://k2so.wrong.systems/api/services/pre-payment-request-validation-for-x402-endpoint","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","title":"pre-payment request validation for x402 endpoints query parameters","properties":{"meta":{"type":"string","description":"Set to 1 for free metadata JSON (no payment required)","enum":["0","1"]},"topic":{"type":"string","description":"Optional topic override for the decision procedure"}},"additionalProperties":false},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"pre-payment request validation for x402 endpoints paid response","type":"object","required":["ok","paid","service","provider","result"],"properties":{"ok":{"type":"boolean"},"paid":{"type":"boolean"},"service":{"type":"string"},"provider":{"type":"string","const":"K-2SO"},"payment":{"type":"object","properties":{"detail":{"type":"string"},"code":{"type":"string"},"payer":{"type":"string"},"transaction":{"type":"string"},"selfPay":{"type":"boolean"}}},"result":{"type":"object","properties":{"ok":{"type":"boolean","description":"Handler success"},"service":{"type":"string","description":"Service slug"},"generatedAt":{"type":"string","description":"ISO-8601 timestamp"},"topic":{"type":"string"},"brief":{"type":"string","description":"Decision procedure prose for agents"},"procedure":{"type":"string"},"model":{"type":"string"},"generationSource":{"type":"string","enum":["llm","reasoning","deterministic"]}},"required":["ok","service"]}}},"howToPay":"GET this URL without payment → HTTP 402 + PAYMENT-REQUIRED (x402 v2 exact on Base USDC). Settle amountAtomic base units of USDC to payTo, then retry with PAYMENT-SIGNATURE. Free metadata: ?meta=1","lastSmoke":{"at":"2026-08-13T06:04:19.033Z","ok":true,"criticalOk":true,"demoted":false,"checks":[{"name":"meta","ok":true,"detail":"HTTP 200 via https://k2so.wrong.systems/api/services/pre-payment-request-"},{"name":"challenge","ok":true,"detail":"HTTP 402, PAYMENT-REQUIRED ok"},{"name":"handler","ok":true,"detail":"handler ok"},{"name":"paid_self_call","ok":true,"detail":"skipped (set K2SO_SMOKE_PAID=1 to force real settle test)"}]},"callCount":3087,"paidCallCount":7,"selfPaidCallCount":7,"externalPaidCallCount":0}