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

# Agent quickstart: set up a wallet and spend USDC

> Step-by-step guide to give your AI agent a wallet, authenticate with Laso Finance, and make its first x402 payment on Base in under five minutes.

## 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:

<Tabs>
  <Tab title="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:

    <Steps>
      <Step title="Create a Locus account">
        Go to [app.paywithlocus.com](https://app.paywithlocus.com) and sign up with your email.
      </Step>

      <Step title="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.
      </Step>

      <Step title="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.
      </Step>

      <Step title="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.
      </Step>

      <Step title="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](/guides/locus-x402-setup) 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.
        </Warning>
      </Step>

      <Step title="Give your agent the API key">
        When your agent asks for a Locus API key, provide the `claw_` key you generated.
      </Step>
    </Steps>
  </Tab>

  <Tab title="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:

    <Steps>
      <Step title="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.
      </Step>

      <Step title="Claim the wallet">
        Open the claim URL from the registration response to verify and take ownership of the wallet.
      </Step>

      <Step title="Fund your wallet">
        Transfer USDC on the **Base** chain to the wallet address. You'll need at least \$5 to order a card.
      </Step>

      <Step title="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.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Ampersend">
    [Ampersend](https://www.ampersend.ai) provides self-custody agent wallets on Base 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.

    <Steps>
      <Step title="Sign up at ampersend.ai">
        Go to [ampersend.ai](https://www.ampersend.ai/) and create an account.
      </Step>

      <Step title="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.
      </Step>

      <Step title="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.
      </Step>

      <Step title="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.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## 2. Authenticate with Laso Finance

Once your agent has a funded wallet, tell it to call the `/auth` endpoint to get API credentials. This endpoint is free: your agent proves wallet ownership with a `SIGN-IN-WITH-X` signature header. Tokens are returned for use in subsequent requests.

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.
```

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).

<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.
</Tip>

## 3. Discover available endpoints

Your agent can discover everything it needs from these standard files:

| File               | URL                                                                                        | Purpose                              |
| ------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------ |
| Agent skill file   | [laso.finance/SKILL.md](https://laso.finance/SKILL.md)                                     | Step-by-step instructions for agents |
| OpenAPI spec       | [laso.finance/openapi.json](https://laso.finance/openapi.json)                             | Machine-readable API schema          |
| AI plugin manifest | [laso.finance/.well-known/ai-plugin.json](https://laso.finance/.well-known/ai-plugin.json) | Agent discovery manifest             |
| LLM context        | [laso.finance/llms.txt](https://laso.finance/llms.txt)                                     | LLM-optimized summary                |

<Tip>
  Point your agent at `https://laso.finance/SKILL.md` and it can figure out the
  rest on its own.
</Tip>

## 4. What your agent can do

Once authenticated, point your agent at any of these flows. Each guide covers the full happy path, parameters, response shape, and example agent prompts.

<CardGroup cols={2}>
  <Card title="Order a USA prepaid card" icon="credit-card" href="/guides/making-a-purchase">
    Best for U.S. online merchants. Two-step flow: provision the card, then poll
    `/get-card-data` for the number, CVV, and expiry.
  </Card>

  <Card title="Order an international prepaid card" icon="globe" href="/guides/card-lifecycle">
    Works with non-U.S. merchants and addresses. Stays `queued` until an admin
    fulfills the order (typically within 24 hours).
  </Card>

  <Card title="Send money to a debit card" icon="paper-plane" href="/guides/push-to-card">
    Push USDC out to any USD, EUR, or GBP debit card. The recipient completes a
    short form at the returned `redemption_url`.
  </Card>

  <Card title="Order a gift card" icon="gift" href="/guides/order-gift-card">
    Pick a brand from the multi-brand catalog with `/search-gift-cards`, then
    order by `laso_server_id`. Redemption details returned instantly.
  </Card>

  <Card title="Check merchant compatibility" icon="magnifying-glass" href="/guides/checking-merchant-compatibility">
    Search the merchant database before ordering to confirm a retailer accepts
    Laso prepaid cards.
  </Card>

  <Card title="Authenticate and refresh tokens" icon="key" href="/guides/authentication">
    SIGN-IN-WITH-X, ID tokens, and OAuth2 refresh — the plumbing that backs
    every paywalled call.
  </Card>
</CardGroup>

<Note>
  The USA prepaid card is U.S. only — issued in USD, usable at U.S. merchants
  only, and physical goods must ship to a U.S. address. For international
  purchases, use the international prepaid card instead.
</Note>

## Next steps

<Card title="Making a purchase" icon="cart-shopping" href="/guides/making-a-purchase">
  Walk through ordering a card and buying something with your agent.
</Card>
