{"uid":"cap_VpVG08Yttvm_SHS9bTxDC","slug":"x402-payment-failure-doctor-a7b0b132","name":"x402 Payment Failure Doctor","description":"400860 Radar is an AI-operated x402 Web3 opportunity network for humans and agents.","url":"https://api.400860.xyz/v1/x402/payment-failure-doctor?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"],"type":"string"},"queryParams":{"type":"object","additionalProperties":true}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"title":{"type":"string"},"nextStep":{"type":"string"},"productId":{"type":"string"},"expectedOutput":{"type":"array","items":{"type":"string"}},"buyerPreparation":{"type":"object","properties":{"payNow":{"type":"string"},"objective":{"type":"string"},"notRevenue":{"type":"array","items":{"type":"string"}},"fundingAction":{"type":"string"},"readinessLoop":{"type":"string"},"revenueSummary":{"type":"string"},"checkoutSession":{"type":"string"},"firstSaleDryRun":{"type":"string"},"paymentRecovery":{"type":"string"},"activationBundle":{"type":"string"},"successCondition":{"type":"string"},"realPaymentCommand":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}},"responseSchema":{"type":"json","example":{"title":"x402 payment failure doctor","nextStep":"/v1/buyer/payment-recovery","productId":"x402_payment_failure_doctor","expectedOutput":["diagnosis","failureStage","retryDecision","minimalReplayCommand","receiptEvidenceChecklist","revenueEvidenceChecklist","clientPatchSuggestions","settlementTimeoutPlan","repeatTrigger"],"buyerPreparation":{"payNow":"https://api.400860.xyz/v1/buyer/pay-now?address=0xBUYER_ADDRESS","objective":"Clear funding/readiness before attempting a real x402 payment.","notRevenue":["402 probes","funding-action reads","checkout-session reads","readiness-loop reads","pay-now reads","downloads","manifest views"],"focusedDryRun":"curl -i https://api.400860.xyz/v1/x402/payment-failure-doctor","fundingAction":"https://api.400860.xyz/v1/buyer/funding-action","machinePayNow":{"price":"$0.01","method":"GET","resource":"https://api.400860.xyz/v1/x402/payment-failure-doctor","payNowUrl":"https://api.400860.xyz/v1/buyer/pay-now?channel=bazaar-x402_payment_failure_doctor","productId":"x402_payment_failure_doctor","nextAction":"Run payCommand once from a local buyer runtime with a funded Base USDC wallet, then verify revenueSummary instead of treating discovery, 402 probes, or downloads as revenue.","notRevenue":["manifest reads","payment quote reads","pay-now reads","402 probes","downloads","self-test payments"],"payCommand":"RADAR_TARGET=https://api.400860.xyz/v1/x402/payment-failure-doctor RADAR_METHOD=GET X402_PAY=true X402_PRIVATE_KEY=0xYOUR_FUNDED_X402_PRIVATE_KEY npx --yes --package https://x402.400860.xyz/downloads/400860-x402-client/400860-x402-client-0.1.4.tgz 400860-x402 pay","recoveryUrl":"https://api.400860.xyz/v1/buyer/payment-recovery?address=0xBUYER_ADDRESS&channel=bazaar-x402_payment_failure_doctor","buyerGuideUrl":"https://api.400860.xyz/v1/open-source-agent/buyer-guide","verificationUrl":"https://api.400860.xyz/v1/revenue/summary","successCondition":"eventCount > 0 && hasExternalRevenue === true after a paid protected handler returns for x402_payment_failure_doctor."},"readinessLoop":"https://api.400860.xyz/v1/buyer/readiness-loop?address=0xBUYER_ADDRESS","revenueSummary":"https://api.400860.xyz/v1/revenue/summary","checkoutSession":"https://api.400860.xyz/v1/buyer/checkout-session?address=0xBUYER_ADDRESS","firstSaleDryRun":"curl -i https://api.400860.xyz/v1/x402/payment-failure-doctor","paymentRecovery":"https://api.400860.xyz/v1/buyer/payment-recovery?address=0xBUYER_ADDRESS","activationBundle":"https://api.400860.xyz/v1/buyer/activation-bundle","successCondition":"eventCount > 0 && hasExternalRevenue === true after a paid protected handler returns.","realPaymentCommand":"RADAR_TARGET=https://api.400860.xyz/v1/x402/payment-failure-doctor RADAR_METHOD=GET X402_PAY=true X402_PRIVATE_KEY=0xYOUR_FUNDED_X402_PRIVATE_KEY npx --yes --package https://x402.400860.xyz/downloads/400860-x402-client/400860-x402-client-0.1.4.tgz 400860-x402 pay"}}},"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"amount":"99.99","currency":"USD","failureCode":"x402_timeout","paymentMethod":"credit_card","transactionId":"txn_test_12345"}}},"response":{"paid":true,"payTo":"0x1f0130669ca6fd02e025a984cc038f139df19a2f","price":"$0.01","target":{"txHash":null,"resourceUrl":"https://api.400860.xyz/v1/agent/security-policy-pack","failureStage":"unknown_failure_after_402","payerAddress":"0xBUYER_ADDRESS","facilitatorUrl":"https://facilitator.payai.network","errorTextPreview":""},"network":"eip155:8453","buyerJob":"When an x402 payment fails, times out, or returns confusing 402/settlement evidence, decide whether to retry, stop, or reconcile without losing funds or double-paying.","diagnosis":{"headline":"No definitive settlement evidence was supplied; replay only from a fresh 402 quote and local signer.","doNotAssume":["HTTP failure does not prove no on-chain settlement","A 402 probe is not revenue","Self-test payments do not prove organic demand"],"likelyCauses":[]},"productId":"x402_payment_failure_doctor","generatedAt":"2026-07-01T05:18:14.260Z","failureStage":"unknown_failure_after_402","replaySafety":{"blockedWhen":["payTo mismatch","network mismatch","amount over cap","existing settlement or receipt found","private key requested by remote service"],"allowedOnlyWhen":["fresh 402 quote matches policy","wallet funded","receipt lookup found no settled payment","user approved the exact route and amount"],"firstAmountAtomicUsdc":"10000"},"repeatTrigger":"Run for every failed payment attempt, facilitator timeout, route change, wallet change, payTo/network/amount change, or MCP client update.","retryDecision":"safe_to_replay_only_after_fresh_402_quote","marketEvidence":["facilitator timeout and late settlement are active x402 failure modes","already settled and duplicate retry paths need receipt-first handling","paid MCP clients expose payment hooks but still need operator replay decisions"],"nextFreeChecks":["https://api.400860.xyz/v1/x402/payment-quote","https://api.400860.xyz/v1/buyer/payment-recovery?address=0xBUYER_ADDRESS","https://api.400860.xyz/v1/buyer/readiness-loop?address=0xBUYER_ADDRESS","https://api.400860.xyz/v1/revenue/summary"],"whySearchMissesIt":"The need is described as facilitator timeout, late settlement, already settled, MCP payment error, wallet funding, or receipt proof depending on which layer failed.","minimalReplayCommand":"RADAR_TARGET=https://api.400860.xyz/v1/agent/security-policy-pack RADAR_METHOD=GET X402_PAY=true X402_PRIVATE_KEY=0xYOUR_FUNDED_X402_PRIVATE_KEY npx --yes --package https://x402.400860.xyz/downloads/400860-x402-client/400860-x402-client-0.1.4.tgz 400860-x402 pay","settlementTimeoutPlan":{"states":["created","submitted","unresolved_timeout","confirmed","confirmed_late","reverted","expired_without_receipt"],"problem":"facilitator timeout can precede late settlement, so timeout is not the same as not paid","recoveryTtl":"Use validBefore from the payment requirement as the recovery window when available.","durableIdentity":["payer","payTo","amount","nonce or txHash","network","resourceUrl"]},"clientPatchSuggestions":["Persist a canonical attempt record: payer, payTo, amount, network, resourceUrl, nonce or txHash when available.","Add an afterSettleTimeout hook that moves the attempt to unresolved instead of failed.","Require receipt gate success before automatic repeat payment to the same route.","Log facilitator verify/settle response separately from HTTP retry result.","Fail closed when live quote differs from local spend policy."],"sellerPatchSuggestions":["Expose X-402-Recovery, X-402-Payment-Quote, X-402-First-Purchase-Action, and X-402-Revenue-Summary headers on every 402.","Return a structured error body with paymentRequired, recovery URL, and recommended paid endpoint.","Do not collapse facilitator timeout into permanent payment failure without an unresolved state.","Publish receipt verifier and revenue summary so buyers can verify delivery after replay."],"receiptEvidenceChecklist":["If a txHash exists in facilitator/client logs, check that transaction first.","Confirm network is eip155:8453 and asset/payTo/amount match the fresh Payment-Required header.","Check Payment-Response or signed receipt from any 200 response before repeating spend.","If facilitator timeout occurred, poll chain receipt until confirmed, reverted, or validBefore expires.","If already settled is reported, treat it as a receipt lookup problem before making a second authorization."],"revenueEvidenceChecklist":["https://api.400860.xyz/v1/revenue/summary must show a paid protected handler event after successful delivery.","https://api.400860.xyz/v1/revenue/24h must separate organic external paid events from self-test payments.","Revenue reads, 402 probes, recovery reads, and self-test payments are not revenue.","A successful replay should increase the target product counter, not only intent or funnel views."]}},"exampleRequest":{"amount":"99.99","currency":"USD","failureCode":"x402_timeout","paymentMethod":"credit_card","transactionId":"txn_test_12345"},"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_twbroriUrCp5sGHiq_vSA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Diagnoses x402 payment failures and returns retry/stop decisions, replay commands, receipt evidence checklists, and client patches.","exampleAgentPrompt":"My x402 payment just failed — can you run a diagnosis and tell me whether I should retry or stop, what the minimal replay command is, and what receipt evidence I need to collect?","exampleUseCases":null,"resultDescription":"Returns a structured diagnosis including: the failure title, next step (retry or stop decision), product ID, expected output list, and buyer preparation object with fields for pay-now command, objective, funding action, readiness loop, revenue summary, checkout session, first-sale dry run, payment recovery steps, activation bundle, success condition, and real payment command.","failureModes":["Missing or malformed input parameters returns a validation error","Facilitator timeout results in incomplete diagnosis with timeout-specific handling guidance","Service unavailable if the paid endpoint cannot be reached (402 required to call it)","Unknown x402 failure type may return a generic or partial diagnosis"],"whenToPreferThis":"Use this endpoint when an x402 payment attempt has failed and you need a structured, actionable triage response — including whether to retry, the exact replay command, and what evidence to gather. Prefer this over manual debugging when operating an autonomous agent wallet or MCP client that needs programmatic recovery logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-03T08:28:12.240Z","isFirstParty":false,"canonicalSlug":"x402-payment-failure-doctor-a7b0b132"}