How to make an online purchase
Once your agent is set up and authenticated, it can buy things online using a prepaid card from Laso Finance. Here are example prompts:Buy something online
Buy something online
Send a Venmo payment
Send a Venmo payment
Send a PayPal payment
Send a PayPal payment
What happens under the hood
When your agent calls a Laso Finance endpoint, the x402 protocol handles payment automatically:Agent navigates to the store
Your agent browses the merchant’s website, adds items to cart, and proceeds
to checkout to determine the exact purchase total (including tax and
shipping).
Agent checks merchant compatibility (optional)
Before ordering a card, your agent can call
GET /search-merchants?q=nike to check if the card is known to work at
that merchant. If the merchant comes back as accepted, you’re good to go.
If not_accepted, the card will fail there. If the merchant isn’t listed or
is unknown, it just means no one has tried it yet — the card likely will still
work.Agent orders a card for the exact amount
Your agent calls
https://laso.finance/get-card?amount=X where X is the
checkout total.Server responds with payment details
The server returns a
402 Payment Required response with the price,
recipient wallet address, and network (Base USDC).Agent pays via Locus wallet
The x402 client automatically constructs a payment using your agent’s Locus
wallet and replays the request.
Card is issued
The server verifies payment and returns a
card_id. Card details (number,
CVV, expiry) become available in ~7-10 seconds.Agent retrieves card details
Your agent polls
https://laso.finance/get-card-data?card_id=X with the
Bearer token until status is "ready".Example: buying an item
Here’s what a full purchase flow looks like when you tell your agent to buy something:- Navigate to Nike.com and find the Nike Air Max 90s in size 10
- Add the item to cart and proceed to checkout
- Determine the exact total including tax and shipping (e.g. $148.23)
- Call
GET https://laso.finance/get-card?amount=148.23via x402 (pays $148.23 USDC from Locus wallet) - Receive a
card_idandid_tokenin the response - Poll
GET https://laso.finance/get-card-data?card_id=Xwith the Bearer token until the card details are ready - Enter the card number, CVV, and expiry on the checkout page
- Enter the shipping address and complete the order
Cards are US only. They can only be used at US-based merchants for USD
purchases. Physical goods must ship to a US address.