{"uid":"cap_GjG-ObsKQSnKPe9N2jwJw","slug":"delx-commerce-x402-refund-amount-check-230e5ef6","name":"Delx Commerce X402 Refund Amount Check","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/x402-refund-amount-check?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"settled_raw":{"type":"string","maxLength":8192,"description":"Settled Raw supplied to X402 Refund Amount Check; used only for this bounded calculation and processed in memory without retention."},"requested_raw":{"type":"string","maxLength":8192,"description":"Requested Raw supplied to X402 Refund Amount Check; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"drift_raw":"0","actual_raw":"1000","expected_raw":"1000","within_tolerance":true},"schema":"delx/util-x402-refund-amount-check/v1","status":"pass","evidence":{"retained":false,"input_sha256":"8f2b3a0b094ceb2d8c75d4ce4b7f179347769e2b9645666d7c973aae510291f0","external_calls":0},"operation":"delivery_contract:x402_refund_amount_check"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ERlZng508qMiMmTFRhc2O","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Verifies whether a settled payment amount matches the requested amount within acceptable tolerance for X402 protocol refund calculations","exampleAgentPrompt":"Check whether the settled payment amount '1000' matches the requested payment amount '1000' in the X402 refund check — I want to know if there's any drift and whether it's within tolerance.","exampleUseCases":[{"title":"Verify micropayment before issuing refund","prompt":"Before I process a refund for this x402 transaction, check whether the settled raw amount '950' actually matches the requested raw amount '1000' — tell me the drift and whether it's within acceptable tolerance."},{"title":"Audit agent payment delivery accuracy","prompt":"My AI agent just completed a pay-per-result API call and the settled amount was '1000' raw units but the request was for '1000' — can you run the x402 refund amount check to confirm there's zero drift and delivery was correct?"},{"title":"Detect underpayment in USDC transaction","prompt":"I need to verify a USDC payment where the settled raw value was '850' but the requested raw value was '1000' — run the refund amount check and tell me if it passes or fails tolerance."}],"resultDescription":"Returns a JSON object with drift_raw (difference between expected and actual), actual_raw, expected_raw, within_tolerance boolean, an overall status (pass/fail), operation identifier, and an evidence block containing the input SHA-256 hash and confirmation that no external calls were made and no data was retained.","failureModes":["Invalid or non-numeric raw values cause validation to fail","Missing settled_raw or requested_raw fields return an error","Strings exceeding 8192 characters are rejected","Malformed JSON body returns a 400 error","Large drift beyond tolerance returns within_tolerance: false with a fail status"],"whenToPreferThis":"Use this endpoint when you need a verifiable, cryptographically evidenced check of whether a settled X402 payment amount matches the requested amount — particularly when building refund logic, auditing agent payment pipelines, or confirming delivery fidelity in pay-per-result architectures on Base or Solana. Prefer this over manual calculation when you need the tamper-evident evidence hash and explicit tolerance logic baked in.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:02.003Z","isFirstParty":false,"canonicalSlug":"delx-commerce-x402-refund-amount-check-230e5ef6"}