The values an agent or its developer should compare before signing an x402 payment, which ones our own buyer script checks, and which it leaves out.
Before it signs an x402 payment, an agent should compare the terms in the 402 response with values its owner fixed in advance: the network, the token, the recipient, the amount and the time window. If any of them differs, it stops and does not sign. If a value cannot be compared because the owner never set it, it asks a person. Signing is the step that cannot be taken back. In our view the standard flow has no later step where a wrong decision would be caught, so the work happens before the signature. It is cheap: the price, network, asset, recipient and window are all in the 402 response.
Read the full report on AISkills402: https://aiskills402.com/blog/when-should-agent-pay-402
Top comments (1)
Good list. One check we'd add on the recipient: not only "is it the address the owner expected", but also "is it on a sanctions list". We run that as a separate signed call before signing (OFAC, UN, EU and UK), and treat any failure or unavailable list as do not pay, the same rule as yours. Short write up with code: dev.to/nikoble1926/check-the-payee...