agent x402-pay calls an x402 endpoint, reads the price from its 402 response, pays from the agent wallet, and returns the service’s response. Payments come out of the allowance in session mode. For how x402 works, see x402 payments.
The wallet needs USDC on the network the service uses. Services in the Agentic Services catalog all settle in USDC on Polygon.
1
Find the service and its price
Read the live catalog. Each route lists its URL, method, price, and You can also browse and test services at agent-discovery.polygon.org/discover.
payTo address:2
Preview the payment
3
Pay and get the response
Run the same command with The output has the service’s response and the payment transaction.
--broadcast:--header Key:Value for extra headers. The network and token come from the 402 response.
Spending limits
These sit inside the wallet’s allowance: a payment the allowance doesn’t cover fails even when it’s under these limits.
Test your own endpoint
Pointx402-pay at a route you’ve priced with x402 middleware to check the whole flow. See Accept x402 payments.