{"uid":"cap_k_C-7jqFAqfRMl4MmLzt8","slug":"x402-refund-oracle-verification-procedure-121f7644","name":"x402 Refund-Oracle Verification Procedure","description":"Decision procedure that grades merchant refund claims on x402 rails before an agent writes the reversal off as received. Inputs: merchant-signed refund attestation, on-rail reversal record, original payment id and settlement window. Rules: 1) attestation must be signed by the payee key that received the original payment; 2) reversal record must sit on the same rail and network as the original payment and land within 2 settlement cycles; 3) attestation without an on-rail reversal record means","url":"https://k2so.wrong.systems/api/services/x402-refund-oracle-verification-procedure?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":"x402 refund-oracle verification 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":{"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":"x402-refund-oracle-verification-procedure","procedure":"same as brief","generatedAt":"2026-01-01T00:00:00.000Z","generationSource":"deterministic"},"service":"x402-refund-oracle-verification-procedure","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_YovqJlFPuz3nG7i8q9Kyq","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":"Grades merchant refund claims on x402 payment rails by verifying signed attestations and on-chain reversal records before an agent marks a refund as received.","exampleAgentPrompt":"Check whether this merchant refund claim is legit before I mark it as received — verify that the refund attestation is signed by the correct payee key, that the on-rail reversal record sits on the same x402 rail and network as the original payment, and that it landed within 2 settlement cycles.","exampleUseCases":[{"title":"Autonomous agent refund acceptance gate","prompt":"I just got a refund attestation from a merchant on x402 rails — before my agent marks the reversal as received, can you run the oracle verification procedure to confirm the attestation is signed by the original payee key and the on-chain reversal record matches the original payment ID and settlement window?"},{"title":"Disputed refund integrity check","prompt":"A merchant claims they issued a refund for payment ID txn-8821 on the Base x402 rail, but I'm not sure the reversal actually landed on-chain within the required settlement cycles — can you grade their refund claim and tell me whether it passes or fails the verification rules?"},{"title":"Automated refund audit before reconciliation","prompt":"Before I reconcile this batch of x402 payments, I need to verify that the merchant refund attestation for order #5543 is valid — check that it has a corresponding on-rail reversal record and that the payee key signature is correct."}],"resultDescription":"A JSON object containing an ok boolean, a 'brief' field with plain-prose decision procedure text (120+ words) explaining whether the refund claim passes or fails verification, the topic, service slug, generation source (llm, reasoning, or deterministic), and an ISO-8601 timestamp. The result indicates whether the attestation and reversal record satisfy all three verification rules.","failureModes":["Attestation not signed by original payee key — claim fails rule 1","Reversal record on different rail or network than original payment — claim fails rule 2","Reversal landed outside 2-settlement-cycle window — claim fails rule 2","Attestation present but no on-rail reversal record found — claim fails rule 3","Missing or malformed payment ID — unable to look up original payment","Payment required (402) if not including valid x402 payment header","Topic override not recognized — falls back to default procedure"],"whenToPreferThis":"Use this endpoint when an AI agent needs to validate a merchant-issued refund on x402 payment rails before marking the reversal as received or completing reconciliation. Prefer this over generic refund checks when you need x402-specific rule enforcement: payee key signature verification, same-rail reversal confirmation, and settlement-window compliance. Particularly valuable for unattended agents that cannot manually inspect on-chain data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T18:28:31.296Z","isFirstParty":false,"canonicalSlug":"x402-refund-oracle-verification-procedure-121f7644"}