Agent Wallet

Pay an x402 endpoint from the managed wallet

Settles an x402 payment on your behalf, so you never build a payment header or hold a private key. Takes either a Laso route name or the full url of any external x402 endpoint on the open web.

For an external url, pin maxAmountUsdc plus optionally expectedAsset / expectedNetwork / expectedPayTo; a challenge that exceeds or does not match them is refused.

An external endpoint can settle in USDC on Solana or on Base mainnet (eip155:8453), and both are paid from the same balance with nothing to set up. When the Base side cannot cover a Base payment, Laso moves what is needed over from Solana just before signing (usually under 10 seconds, 0.075% of the amount moved). No ETH is needed for gas. Other EVM networks are refused. If an endpoint offers both, pin expectedNetwork to choose. Laso routes are always paid on Solana.

The call succeeds as long as the request went out, so check the returned status — it is the endpoint's status, not the callable's.

A Firebase callable. Callables wrap the request in {"data": ...} and the reply in {"result": ...}. Send the id_token from /auth as a Bearer token. Free.

post/agentX402Pay

Request

  • Base URL: https://laso.finance
  • URL: https://laso.finance/agentX402Pay
  • Auth: API key in header Authorization

Request body

Example request

{
  "data": {
    "userId": "usr_7aff81763cae58c936aa6de67dd5a95e",
    "maxAmountUsdc": 5
  }
}

Response

The paid call's status, body, and an error when the endpoint refused.

resultobject

Changes

No recorded changes to this operation across all 3 revisions of this API.