{"uid":"cap_dVJHJb8323pHJSZ8WyYIR","slug":"x402-payment-error-diagnostics-b8c9c009","name":"x402 Payment Error Diagnostics","description":"Diagnose a failed x402 payment. Returns structured error code, human explanation, and exact fix. Example: /diagnose?error=insufficient_funds&balance=0.003&required=0.01","url":"https://code-toll-production.up.railway.app/diagnose?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","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"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":"unknown","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_HS-i2zn8qyadAV5qV-Y0K","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 a failed x402 payment by returning a structured error code, human-readable explanation, and exact remediation steps","exampleAgentPrompt":"My x402 payment just failed with an insufficient_funds error — my wallet has 0.003 USDC but the call requires 0.01 USDC. Can you diagnose what went wrong and tell me exactly how to fix it?","exampleUseCases":[{"title":"Debug wallet balance shortfall","prompt":"My agent got an insufficient_funds error trying to pay for an API call — the balance is 0.003 USDC but the required amount is 0.01. Can you diagnose the payment failure and tell me what I need to do to fix it?"},{"title":"Understand unknown x402 error code","prompt":"I'm getting an x402 payment error I don't recognize — the error code is 'payment_expired'. Can you explain what that means and give me the exact steps to recover from it?"},{"title":"Automate payment failure recovery","prompt":"Whenever my agent hits a payment failure, I want it to automatically diagnose the error and get the structured fix instructions so it can self-heal. Right now it's failing with error code 'invalid_recipient' — what's the diagnosis and resolution?"}],"resultDescription":"Returns a structured JSON object containing: a canonical error code, a plain-English explanation of why the payment failed, and a precise step-by-step fix the caller can act on immediately.","failureModes":["Missing required 'error' query parameter — returns 400 bad request","Unrecognized error code — may return generic or null explanation","Service unavailable on Railway hosting — returns 503","Malformed query parameters — returns 400 with validation error"],"whenToPreferThis":"Choose this endpoint when an x402 or HTTP 402 payment has failed and you need a structured, actionable diagnosis with exact remediation steps — especially when building agents that need to self-heal from payment errors. Prefer it over generic error lookup services when the error is specifically in the x402 micropayment protocol context.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-24T12:30:08.203Z","isFirstParty":false,"canonicalSlug":"x402-payment-error-diagnostics-b8c9c009"}