A buyer who paid and lost the reply sends the same payment header again. The seller's answer decides between a receipt, a second charge or free goods.
The usual way an x402 seller causes a double charge is not an attack. A buyer pays, the connection drops before the reply arrives, and the buyer's program asks for the same resource again. What the seller does with that second request is the whole story: it can show the receipt, hand over the goods to the right person, or send back a refusal that makes the buyer's client sign a brand new payment. This guide explains where those branches go wrong, why the failures are silent, and how to test the seller side for them. It covers the seller's code once a signed header arrives, not the storefront and not the buyer.
Read the full report on AISkills402: https://aiskills402.com/blog/x402-settlement-replay-double-charge?utm_source=devto&utm_medium=social
Top comments (0)