Skip to main content
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

Valid 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

Include a 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.
Pin the price, asset, network, and receiver on every external payment. See Guardrails.

Request options

Both modes accept:

Read the response

The endpoint’s response comes back wrapped:
Check the inner status, not the HTTP code. The callable returns HTTP 200 whenever the call completed, including when the endpoint refused. Treat any inner status outside 200–299 as a failure.
On a non-2xx, 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.
Returns { "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.