agentX402Pay settles an x402 payment from the managed wallet and returns the endpoint’s own response. It works in two modes: route for Laso’s endpoints, url for anyone else’s.
Set up the wallet first in the overview.
Pay a Laso route
route values: get-card, order-gift-card, order-intl-card, get-push-to-card, send-payment. Free endpoints are not routes; call those directly with your Bearer token.
Pay an external x402 endpoint
note in url mode: one sentence on why you are paying and who it is for. It is shown next to the charge in the owner’s activity feed. Notes over 300 characters are truncated. note is refused with route, since Laso purchases are already labeled.
Request options
Both modes accept:Read the response
The endpoint’s response comes back wrapped:result.error is one sentence naming the host, status, and reason, normalized from whatever field the service used.
An inner 402 almost always means the wallet could not cover the total. Laso fees are charged on top of the amount you request, so a wallet holding exactly $2,000 cannot send a $2,000 bank payment (it costs $2,005.00). Nothing is charged for a failed payment, so retrying with a smaller amount is safe.
Move funds out
agentWalletTransfer sends USDC from the managed wallet to any Solana address.
{ "result": { "transferId": "...", "txHash": "...", "destinationAddress": "..." } }.
Next steps
Guardrails
Refuse any external challenge that does not match what you agreed to pay.
Making a purchase
The two-step card flow you reach through
agentX402Pay.