{"uid":"cap_7ONMv93jgPubf6_81oHsR","slug":"cross-protocol-payment-intent-routing-decision-procedure-77dc2f1b","name":"Cross-Protocol Payment-Intent Routing Decision Procedure","description":"Decision procedure for an agent holding a payment intent that can be settled via multiple protocols: x402, AP2, or MPP. Covers protocol capability checks against the merchant offer, intent normalization across protocols, cost and latency comparison, scoped-account policy envelope checks (approved intent, policy expiry, spending caps) before routing, a single-routing rule so one intent is never double-settled across protocols, re-quote fallback, and receipt binding to the chosen protocol.","url":"https://k2so-8080.on.ascii.dev/api/services/agent-payment-intent-and-authorization-governanc","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 payment-intent routing 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_9Iwcsd0r2iHYvPWrwKFZH","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 an agent-facing decision procedure for routing a payment intent across x402, AP2, or MPP protocols, covering capability checks, cost/latency comparison, policy enforcement, single-routing rules, and receipt binding.","exampleAgentPrompt":"I need to pay a merchant but they support x402, AP2, and MPP — walk me through the full decision procedure for picking the right protocol, including policy checks, cost and latency comparison, how to avoid double-settlement, and how to bind the receipt once I've chosen.","exampleUseCases":[{"title":"Choosing cheapest rail for recurring agent payments","prompt":"My agent needs to pay a merchant that accepts x402 and AP2 — give me the step-by-step procedure to compare fees and settlement speed, check my spending cap, and pick the cheapest protocol without risking double-settlement."},{"title":"Policy-gated payment routing for enterprise agent","prompt":"Before my agent routes a payment intent, I need it to verify the scoped-account policy envelope is still valid, the spending cap hasn't been exceeded, and the approved intent hasn't expired — what's the full procedure for all those checks before committing to a protocol?"},{"title":"Fallback re-quote after failed routing attempt","prompt":"My agent tried to route a payment via x402 but the quote expired mid-flight — what's the correct re-quote fallback procedure to get a fresh quote and re-route to the next best available protocol without double-settling?"}],"resultDescription":"A structured prose decision brief (and optionally a procedure field) describing the step-by-step routing logic: protocol capability checks against the merchant offer, intent normalization, cost and latency scoring, policy envelope validation, single-routing enforcement, re-quote fallback steps, and receipt binding instructions. Includes metadata such as generatedAt timestamp, model used, generation source (llm/reasoning/deterministic), and service slug.","failureModes":["Merchant offer does not match any supported protocol — procedure returns no viable routing path","Policy envelope expired or spending cap exceeded — procedure halts before routing","Re-quote fallback fails if merchant is offline or unresponsive","LLM-generated procedure may be stale if underlying protocol rules change","HTTP 402 returned if payment is not provided; meta=1 query param bypasses payment for free metadata only","Malformed input (wrong HTTP method or missing required fields) returns an error response"],"whenToPreferThis":"Use this endpoint when an agent holds a payment intent that could be settled via more than one protocol (x402, AP2, MPP) and needs authoritative, policy-aware routing logic rather than a simple fee lookup. Prefer it over generic fee-ranking endpoints when you also need policy envelope checks, single-routing enforcement, re-quote fallback logic, and receipt binding guidance bundled into one decision procedure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:43:27.934Z","isFirstParty":false}