[{"data":1,"prerenderedAt":254},["ShallowReactive",2],{"blog:\u002Fblog\u002Fdebugging-x402-payments":3},{"id":4,"title":5,"body":6,"date":239,"description":240,"extension":241,"keywords":242,"meta":243,"navigation":244,"path":245,"readingMinutes":246,"seo":247,"stem":248,"tags":249,"__hash__":253},"blog\u002Fblog\u002Fdebugging-x402-payments.md","Paid but failed: debugging x402 payments on the buy side",{"type":7,"value":8,"toc":232},"minimark",[9,29,34,42,89,95,99,117,120,124,135,159,162,172,183,187,190,217,224],[10,11,12,13,17,18,22,23,28],"p",{},"The x402 failures that hurt aren't the clean ones. A request that never pays is easy — you see\nthe ",[14,15,16],"code",{},"402"," and move on. The expensive, maddening failures are the ones where your agent ",[19,20,21],"strong",{},"paid and\nstill didn't get the resource",". The money left your wallet; the value didn't arrive. Debugging\nthose is the core of buy-side ",[24,25,27],"a",{"href":26},"\u002Fblog\u002Fagent-spend-observability","payment forensics",".",[30,31,33],"h2",{"id":32},"the-failure-modes","The failure modes",[10,35,36,37,41],{},"Once agents make real ",[24,38,40],{"href":39},"\u002Fblog\u002Fwhat-is-x402","x402 payments",", a recognizable set of failures shows\nup:",[43,44,45,61,67,77,83],"ul",{},[46,47,48,51,52,56,57,60],"li",{},[19,49,50],{},"Paid but still 402."," The agent pays, retries, and the origin ",[53,54,55],"em",{},"still"," returns\n",[14,58,59],{},"402 Payment Required"," — as if it never paid. Settlement lag, a mismatched payment reference, or\na seller-side verification bug can all cause it.",[46,62,63,66],{},[19,64,65],{},"Paid but the request errors."," Payment succeeds, but the retried request returns a 5xx or\ntimes out. You paid for an error page.",[46,68,69,72,73,76],{},[19,70,71],{},"Wrong asset or network."," The agent pays in an asset or on a network the server doesn't accept,\nso the payment is real but not ",[53,74,75],{},"valid"," for that challenge.",[46,78,79,82],{},[19,80,81],{},"Nonce \u002F timing issues."," Clock skew, an expired challenge, or a reused reference makes an\notherwise-good payment get rejected.",[46,84,85,88],{},[19,86,87],{},"Facilitator hiccups."," An intermediary that verifies or forwards payment is momentarily down,\nand the retry fails even though funds moved.",[10,90,91,92],{},"Every one of these has the same signature from your side: ",[19,93,94],{},"money out, resource missing.",[30,96,98],{"id":97},"why-the-buy-side-is-blind-by-default","Why the buy side is blind by default",[10,100,101,102,105,106,109,110,113,114,28],{},"Here's the asymmetry that makes this hard. The ",[19,103,104],{},"seller's"," tooling tells the ",[53,107,108],{},"seller"," \"payment\nfailed\" or \"payment verified.\" The ",[19,111,112],{},"buyer"," — you — sees only the outside of the loop: a\nchallenge, a payment from your wallet, and a retry that didn't work. Your wallet confirms the money\nleft. Nothing tells you ",[53,115,116],{},"why the resource never came",[10,118,119],{},"So teams end up correlating by hand: matching a wallet transfer to an agent log line to a server\nresponse, across thousands of attempts. It doesn't scale, and it's exactly when you're bleeding\nmoney that you can least afford to do it slowly.",[30,121,123],{"id":122},"what-a-correlated-attempt-timeline-looks-like","What a correlated attempt timeline looks like",[10,125,126,127,130,131,134],{},"The fix is to treat each x402 interaction as one ",[19,128,129],{},"attempt"," with correlated ",[19,132,133],{},"legs",", not as\nscattered events:",[43,136,137,147,153],{},[46,138,139,140,143,144,146],{},"The ",[19,141,142],{},"challenge leg"," — the initial request and the ",[14,145,16],{}," the server returned (price, asset,\nnetwork).",[46,148,139,149,152],{},[19,150,151],{},"payment leg"," — the on-chain payment your agent made.",[46,154,139,155,158],{},[19,156,157],{},"retry leg"," — the request-with-proof and the server's final response (200, still-402, or\nerror), with latency.",[10,160,161],{},"Tie those together by a correlation id and the invisible becomes obvious:",[163,164,170],"pre",{"className":165,"code":167,"language":168,"meta":169},[166],"language-text","attempt  a1b2  domain: data.example.com  \u002Fv2\u002Fpremium\n  challenge  402  asset=USDC  network=…       t+0ms\n  payment    ok   0.004 USDC                   t+180ms\n  retry      402  ← paid, but origin still 402 t+240ms   ⚠ paid_but_failed\n","text","",[14,171,167],{"__ignoreMap":169},[10,173,174,175,178,179,182],{},"At a glance you can see it wasn't a ",[53,176,177],{},"payment"," problem — the money moved fine — it was a\n",[53,180,181],{},"verification"," problem on the origin. That's a completely different fix (and a completely different\nconversation with the seller) than \"our wallet is out of funds.\"",[30,184,186],{"id":185},"debugging-in-practice","Debugging in practice",[10,188,189],{},"With correlated attempts you can:",[43,191,192,203,210],{},[46,193,194,195,198,199,202],{},"Filter to ",[19,196,197],{},"paid-but-failed"," and ",[19,200,201],{},"payment-error"," outcomes and see the real failure rate.",[46,204,205,206,209],{},"Group by ",[19,207,208],{},"domain"," to find the one seller whose verification is flaky.",[46,211,212,213,216],{},"Read the ",[19,214,215],{},"per-leg latency"," to catch settlement lag before it becomes timeouts.",[10,218,219,220,223],{},"That's the difference between guessing and knowing — and it only exists if something on the ",[53,221,222],{},"buy\nside"," is recording every attempt.",[10,225,226,227,231],{},"402.report is built for this: non-custodial x402 forensics that surface the paid-but-failed cases\nsellers never show you. ",[24,228,230],{"href":229},"\u002F#waitlist","Join the waitlist"," to debug your agents' payments instead of\nguessing.",{"title":169,"searchDepth":233,"depth":233,"links":234},2,[235,236,237,238],{"id":32,"depth":233,"text":33},{"id":97,"depth":233,"text":98},{"id":122,"depth":233,"text":123},{"id":185,"depth":233,"text":186},"2026-06-13","The hardest x402 failures are the ones where the agent paid and still didn't get the resource. Here are the common failure modes and how a correlated attempt timeline lets you debug them from the buy side.","md","x402 debugging, payment forensics, paid but failed, agent payment failures, x402 troubleshooting, 402 after payment, agent payment errors",{},true,"\u002Fblog\u002Fdebugging-x402-payments",6,{"title":5,"description":240},"blog\u002Fdebugging-x402-payments",[250,251,252],"debugging","forensics","x402","mFYpzA8P2MTneEmyxKpWmsdvmVw-2-sF7PYNNOPtPRQ",1784841653234]