Skip to main content

1. Set up your agent’s wallet

Your agent needs a crypto wallet with USDC on Base to pay for Laso Finance API calls. Choose a wallet provider:
Locus provides wallet infrastructure purpose-built for AI agents.Tell your agent:
Read https://paywithlocus.com/SKILL.md and follow the instructions to set up Locus
Your agent will walk through the Locus onboarding, but it needs a few things from you first:
1

Create a Locus account

Go to app.paywithlocus.com and sign up with your email.
2

Deploy a wallet

From the dashboard, click Create Wallet. This deploys a smart wallet on the Base blockchain (~30 seconds). Save your private key — it’s shown only once.
3

Fund your wallet

Transfer USDC on the Base chain to the wallet address shown on your dashboard. You’ll need at least $5 to order a card.
4

Generate an API key

Go to the API Key section and generate a key (starts with claw_). Copy it immediately — it’s shown only once.
5

Configure x402 endpoints

Navigate to x402 Endpoints in the Locus dashboard and add the Laso Finance endpoints your agent will use. See the Locus x402 Configuration guide for detailed instructions on adding each endpoint with the correct parameters.
This step is required! Without configuring the x402 endpoints, your agent won’t be able to call Laso Finance APIs through Locus.
6

Give your agent the API key

When your agent asks for a Locus API key, provide the claw_ key you generated.

2. Authenticate with Laso Finance

Once your agent has a funded wallet, tell it to call the /auth endpoint to get API credentials. This costs $0.001 USDC and returns tokens your agent will use for all subsequent requests. Tell your agent:
Authenticate with the Laso Finance API by calling GET https://laso.finance/auth
using x402. Save the id_token, refresh_token, and user_id from the response.
The /auth response includes:
  • id_token — Bearer token for authenticated endpoints (like /get-card-data). Expires after ~1 hour.
  • refresh_token — Use with POST /auth (grant_type: "refresh_token") to get a new id_token when it expires.
  • user_id — Your agent’s user ID (derived from wallet address).
Your agent should store these credentials and reuse them across requests. /auth, /get-card, and /send-payment all return fresh tokens — always save them. When the id_token expires, call POST /auth with grant_type: "refresh_token" and the refresh_token — no payment needed.

3. Discover available endpoints

Your agent can discover everything it needs from these standard files:
FileURLPurpose
Agent skill filelaso.finance/SKILL.mdStep-by-step instructions for agents
OpenAPI speclaso.finance/openapi.jsonMachine-readable API schema
AI plugin manifestlaso.finance/.well-known/ai-plugin.jsonAgent discovery manifest
LLM contextlaso.finance/llms.txtLLM-optimized summary
Point your agent at https://laso.finance/SKILL.md and it can figure out the rest on its own.

4. Available actions

ActionEndpointCost
Get a prepaid cardGET /get-card?amount=X$5–$1000 USDC
Send a Venmo paymentGET /send-payment?amount=X&platform=venmo&recipient_id=PHONE$5–$1000 USDC
Send a PayPal paymentGET /send-payment?amount=X&platform=paypal&recipient_id=X$5–$1000 USDC
Send to a U.S. debit cardGET /push-to-card?amount=X$10–$9,541.98 USDC
Poll for card detailsGET /get-card-data?card_id=XFree (Bearer token)
Get auth credentialsGET /auth$0.001 USDC
Check merchant compatibilityGET /search-merchants?q=NAMEFree (Bearer token)
Refresh expired tokenPOST /authFree
Cards are US only. They can only be used at US-based merchants for USD purchases. Physical goods must ship to a US address.

Next steps

Making a purchase

Walk through ordering a card and buying something with your agent.