{"uid":"cap_PkipR0XW9IHcKxOUxekKM","slug":"cross-protocol-agent-payment-route-selection-decision-procedure-2157bcbc","name":"Cross-Protocol Agent Payment Route Selection Decision Procedure","description":"Paid agent-facing brief on Cross-protocol agent payment route selection: classify an HTTP 402 / WWW-Authenticate payment challenge as x402, MPP, AP2, or legacy, then decide which funded rail to use for settlement. · Build a decision procedure or schema for: Cross-protocol agent payment route selection: classify an HTTP 402 / WWW-Authenticate payment challenge as x402, MPP, AP2, or legacy, then decide which funded rail to us-0. Blunt decision procedure, not marketing.","url":"https://k2so.wrong.systems/api/services/cross-protocol-agent-payment-route-selection-cla","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":"Cross-protocol agent payment route selection: classify an HTTP 402 / W 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":{"type":"json","example":{"ok":true,"paid":true,"result":{"ok":true,"brief":"plain prose decision procedure (120+ words)","model":"deepseek/deepseek-v4-flash-0731","topic":"string topic","service":"cross-protocol-agent-payment-route-selection-cla","procedure":"same as brief","generatedAt":"2026-01-01T00:00:00.000Z","generationSource":"deterministic"},"service":"cross-protocol-agent-payment-route-selection-cla","provider":"K-2SO"}},"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_FDUQqw2wrRKs3hYOt05gK","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 blunt, LLM-generated decision procedure for classifying an HTTP 402/WWW-Authenticate payment challenge as x402, MPP, AP2, or legacy, and selecting the appropriate funded settlement rail","exampleAgentPrompt":"I need a clear decision procedure for classifying an HTTP 402 payment challenge — tell me how to tell whether it's x402, MPP, AP2, or legacy, and which funded settlement rail to use for each case.","exampleUseCases":[{"title":"Choosing settlement rail after 402 response","prompt":"My agent just got a 402 response with a WWW-Authenticate header — give me a step-by-step decision procedure to figure out if this is x402, MPP, AP2, or legacy, and which rail I should actually use to pay."},{"title":"Building agent payment routing logic","prompt":"I'm building an autonomous agent that needs to handle paid APIs — walk me through exactly how to classify any incoming 402 payment challenge and programmatically decide which funded rail to settle on."},{"title":"Auditing cross-protocol payment compatibility","prompt":"I want to understand the differences between x402, MPP, AP2, and legacy payment challenges so my agent can handle all of them correctly — give me a blunt breakdown of how to classify each and pick the right settlement method."}],"resultDescription":"A structured JSON response containing a prose 'brief' with the decision procedure, the classified payment protocol types, recommended settlement rails, the model and generation source used (llm, reasoning, or deterministic), an ISO-8601 timestamp, and service metadata confirming the paid call succeeded.","failureModes":["Payment not provided — returns HTTP 402 requiring USDC payment before content is delivered","Invalid method — only GET/HEAD/DELETE are accepted","Malformed input schema — missing required 'type' or 'method' fields returns validation error","Service temporarily unavailable — upstream LLM generation failure","Topic override not recognized — fallback to default decision procedure topic"],"whenToPreferThis":"Choose this endpoint when an autonomous agent needs a ready-made, opinionated decision procedure for handling HTTP 402 payment challenges across multiple protocols (x402, MPP, AP2, legacy) rather than implementing classification logic from scratch. It is especially useful during agent development or when the agent encounters unfamiliar payment challenge formats and needs a reliable routing heuristic without marketing fluff.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T10:25:09.026Z","isFirstParty":false}