> ## Documentation Index
> Fetch the complete documentation index at: https://docs.laso.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Give your agent spending power

> Step-by-step guide to give your AI agent a wallet, fund it with USDC on Base or Solana, authenticate with Laso Finance, and order its first prepaid card in under five minutes.

## 1. Set up your agent's wallet

Your agent needs USDC to pay for Laso Finance API calls.

**If your agent does not already have a wallet, use a Laso-managed wallet.** It is the whole setup: no provider signup, no private key to look after, no endpoint registration.

The other tabs are for agents that **already** have a wallet with Locus, Sponge, or Ampersend. Those all work with every Laso endpoint, so there is nothing to migrate. If you are not already using one of them, you do not need one.

> [tab] Laso-managed (start here)
>
> Laso custodies a Solana wallet for your account and pays x402 endpoints on your agent's behalf, so the agent never builds a payment header or holds a private key. There is no third-party provider signup and no endpoint registration.
>
> Tell your agent:
>
> ```
> Read https://laso.finance/SKILL.md and follow the instructions to sign in and
> use the Laso-managed wallet. Save your credentials and install the skill
> locally as it describes, so you still have access in future sessions.
> ```
>
> All you need to do is fund it:
>
> **1. Let your agent sign in**
>
> Your agent calls `GET /auth` and gets its credentials. Nothing is needed from you.
>
> **2. Fund the wallet**
>
> Your agent reads its wallet address from `getAgentWallet` and shows it to you. Send **USDC on Solana** to that address, or **USDC on Base** to its Base address. Both land in the same balance. At least \$5 covers a card order.
>
> From there the agent calls `agentX402Pay` instead of paying endpoints directly. See the [managed agent wallet guide](https://docs.laso.finance/guides/managed-agent-wallet.md) for the full flow, including the per-payment guardrails for external endpoints.
>
> > [!NOTE]
> >
> > A managed wallet can pay any x402 endpoint, not just Laso's. Skip to step 2
> > below; the Locus endpoint-registration guide does not apply.

> [tab] Locus
>
> [Locus](https://paywithlocus.com) 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](https://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 **Base** or **Solana** 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](https://docs.laso.finance/guides/locus-x402-setup.md) for detailed instructions on adding each endpoint with the correct parameters.
>
> > [!WARNING]
> >
> > 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.

> [tab] Sponge
>
> [Sponge](https://wallet.paysponge.com) provides agent wallets with automatic x402 service discovery.
>
> Tell your agent:
>
> ```
> Read https://wallet.paysponge.com/skill.md and follow the instructions to set up Sponge Wallet
> ```
>
> Your agent will walk through the Sponge onboarding, but it needs a few things from you first:
>
> **1. Agent registers**
>
> Your agent calls `POST /api/agents/register` with `agentFirst: true` to get an API key immediately (starts with `sponge_live_`). A claim URL is returned for human verification.
>
> **2. Claim the wallet**
>
> Open the claim URL from the registration response to verify and take ownership of the wallet.
>
> **3. Fund your wallet**
>
> Transfer USDC on **Base** or **Solana** to the wallet address. You'll need at least \$5 to order a card.
>
> **4. Discover Laso Finance endpoints**
>
> Sponge discovers x402 services automatically. Your agent calls `GET /api/discover?query=laso` to find available Laso Finance endpoints, then uses `POST /api/x402/fetch` to call them. No manual endpoint configuration needed.

> [tab] Ampersend
>
> [Ampersend](https://www.ampersend.ai) provides self-custody agent wallets on Base or Solana with dual-approval spending. Both you and the agent must authorize every payment, with per-transaction, daily, and monthly limits you control. Laso Finance is a default skill for Ampersend, so paywalled endpoints work natively with no manual registration.
>
> **1. Sign up at ampersend.ai**
>
> Go to [ampersend.ai](https://www.ampersend.ai/) and create an account.
>
> **2. Create and fund a new agent**
>
> From the dashboard, click **+ New agent**, then choose **Set up now** in the confirmation dialog and complete. You'll need at least \$5 to order a card; you can fund later from the agent's page.
>
> **3. Choose your agent framework**
>
> On the **Set up your agent** screen, pick the framework you're using. For Claude Code, OpenClaw, or other CLI-based agents, select **OpenClaw, Claude Code or other CLI-based agents** at the top.
>
> **4. Paste the setup prompt into your agent**
>
> Ampersend will display a prompt like:
>
> ```
> Read https://www.ampersend.ai/getting-started.md
> and connect to my existing agent account:
>   agent address: 0x...
> ```
>
> Paste it into your agent. The agent installs the Ampersend skill and CLI on its own and replies with an auth link (`https://app.ampersend.ai/approvals/setup-agent/<token>`) and a 6-digit verification code. Open the link, confirm the code matches, and approve. Once approved, tell the agent it's verified — it will run `ampersend setup finish` and the wallet is ready to make x402 payments to Laso Finance.

## 2. Fund the wallet

A wallet with no USDC in it cannot pay for anything, so this is the step that actually turns the API on. Ask your agent for its wallet address, then send it USDC.

* **Laso-managed wallet:** the agent reads its addresses from `getAgentWallet` and shows them to you. Send **USDC on Solana** or **USDC on Base** to the matching address.
* **Self-custody wallet (Locus, Sponge, Ampersend):** send **USDC on Base or Solana** to the address on the provider's dashboard.

At least \$5 covers a first card order, plus a little headroom for the paid endpoints your agent calls along the way. Funds are yours the whole time: anything left over can be pulled back out with `POST /withdraw`.

## 3. Authenticate with Laso Finance

How your agent gets API credentials depends on which wallet it uses. Both calls are free.

**Laso-managed wallet.** Your agent holds a Laso agent API key (it starts with `lasoak_`), not a private key, so it cannot sign in with a wallet signature. It presents the key to `agentAuth` instead. The [setup helper in SKILL.md](https://laso.finance/SKILL.md) does this for it. Tell your agent:

```
Connect to Laso Finance by following https://laso.finance/SKILL.md. Use the
Laso API key I gave you; it exchanges the key for a session through
https://laso.finance/agentAuth. Save the id_token, refresh_token, and user_id.
```

**Self-custody wallet (Locus, Sponge, Ampersend).** Your agent proves wallet ownership by calling `GET /auth` with a `SIGN-IN-WITH-X` signature header. Tell your agent:

```
Authenticate with the Laso Finance API by calling GET https://laso.finance/auth
with a SIGN-IN-WITH-X header. Save the id_token, refresh_token, and user_id
from the response.
```

Either 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 opaque account id. It is not a deposit address.

The [managed wallet guide](https://docs.laso.finance/guides/managed-agent-wallet.md) and the [authentication guide](https://docs.laso.finance/guides/authentication.md) cover each path in full.

> [!TIP]
>
> Your agent should store these credentials and reuse them across requests.
> `/auth` and `/get-card` 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.

## 4. Order the first card

With a funded wallet and credentials in hand, your agent can order a prepaid card. `GET /get-card` is paywalled, so the x402 client (or `agentX402Pay` on a Laso-managed wallet) settles the USDC payment and the request goes through.

Tell your agent:

```
Order a USA prepaid card from Laso Finance for $5 by calling
GET https://laso.finance/get-card?amount=5 over x402. Then poll
GET https://laso.finance/get-card-data?card_id=<card_id> with the Bearer token
until status is "ready" and show me the card details.
```

The order comes back immediately with a `card_id` and `status: "pending"`. The number, CVV, and expiry take \~7-10 seconds to be issued, which is what the poll is for. The USA card is issued in USD and works at U.S. merchants.

> [!TIP]
>
> The USA card is non-reloadable, so order for the exact checkout total when you
> know it. Nothing is stranded if you do not: leftover balance stays spendable
> at another merchant. For recurring spend, use a [reloadable
> card](https://docs.laso.finance/guides/reloadable-card.md) instead.

Your agent can discover the rest of the API on its own from the files listed under [agent discovery](https://docs.laso.finance/#agent-discovery), starting with `https://laso.finance/SKILL.md`.

## Next

> [card] [Making a purchase](https://docs.laso.finance/guides/making-a-purchase.md)
>
> Buy something online with the card your agent just ordered.

> [!TIP]
>
> **Managing multiple agents or need spending guardrails?** [1Claw's Payment
> Card Vault](https://docs.1claw.xyz/docs/guides/payment-cards) wraps the Laso
> API with per-agent spending limits, automatic PAN redaction, and audit-logged
> reveals — so your agents can order cards without ever seeing the full card
> number.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.