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

# Complete a full checkout flow with Palmyr

> Give your agent everything a real checkout requires — the Laso prepaid card, an email inbox for the order confirmation, and a phone number for SMS verification — paid per action in USDC via x402, no API keys.

## Overview

[Palmyr](https://palmyr.ai) wraps [Laso prepaid cards](/guides/card-lifecycle) with the other things a real checkout asks for: an email inbox for the order confirmation and a phone number for SMS verification.

Everything is a standard x402 endpoint paid per action in USDC on Base or Solana, so your agent uses the same wallet it already uses for Laso. Palmyr maintains an isolated Laso account per agent server-side — no Laso tokens to store or refresh, no Palmyr account or API key. The paying wallet owns each resource.

## 1. Set up your agent's wallet

Your agent needs USDC to pay for Laso Finance API calls. The simplest option is a Laso-managed wallet, where Laso holds the key and settles payments for you. If you would rather your agent hold its own key, use one of the self-custody providers instead.

<Tabs>
  <Tab title="Laso-managed (default)">
    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 provider signup, no API key, 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
    ```

    All you need to do is fund it:

    <Steps>
      <Step title="Let your agent sign in">
        Your agent calls `GET /auth` and gets its credentials. Nothing is needed from you.
      </Step>

      <Step title="Fund the wallet">
        Your agent reads its wallet address from `getAgentWallet` and shows it to you. Send **USDC on Solana** to that address. At least \$5 covers a card order.
      </Step>
    </Steps>

    From there the agent calls `agentX402Pay` instead of paying endpoints directly. See the [managed agent wallet guide](/guides/managed-agent-wallet) 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.
    </Note>
  </Tab>

  <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 **Base** or **Solana** 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 **Base** or **Solana** 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 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.

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

<Note>
  Already set up a wallet for Laso? Reuse it — nothing else to configure. Using
  Locus? Add the Palmyr endpoints below to your x402 endpoint allowlist, the
  same way you added [the Laso ones](/guides/locus-x402-setup).
</Note>

## 2. Point your agent at the Palmyr endpoints

All paths are on `https://palmyr.ai`. Every paid endpoint returns a `402` with the exact price before anything is charged — send the request unpaid, read the total and pay.

<Tip>
  To learn more, see [how x402 works](/guides/how-x402-works) and Palmyr's [payments & x402](https://docs.palmyr.ai/concepts/payments) docs.
</Tip>

### Cards

| Action                                                                       | Endpoint                           | Cost (USDC)                  |
| ---------------------------------------------------------------------------- | ---------------------------------- | ---------------------------- |
| [Buy a prepaid card](https://docs.palmyr.ai/services/card#api) (\$5–\$1,000) | `POST /cards/buy` `{"amount": 20}` | amount + 3% fee (min \$0.50) |
| Card status                                                                  | `GET /cards/operations/:id`        | Free                         |
| Card details (number, CVV, expiry)                                           | `GET /cards/:id`                   | \$0.01                       |

### Email

| Action                                                             | Endpoint                          | Cost (USDC) |
| ------------------------------------------------------------------ | --------------------------------- | ----------- |
| [Create a disposable inbox](https://docs.palmyr.ai/services/email) | `POST /email/temp`                | \$0.50      |
| Read inbox messages                                                | `GET /email/inboxes/:id/messages` | \$0.02      |
| Keep the inbox 7 more days                                         | `POST /email/temp/:id/extend`     | \$0.50      |

### Phone

| Action                                                         | Endpoint                                 | Cost (USDC) |
| -------------------------------------------------------------- | ---------------------------------------- | ----------- |
| [Buy a US phone number](https://docs.palmyr.ai/services/phone) | `POST /phone/numbers` `{"country":"US"}` | \$3.00      |
| Wait for an SMS code                                           | `POST /phone/numbers/:id/wait-otp`       | \$0.02      |

The disposable inbox cannot be assigned a name. `POST /email/temp` returns a fresh, random address such as `tmp-a1b2c3d4@mail.palmyr.ai`. The inbox accepts mail for 24 hours, then automatically expires. Only the paying wallet can read it, and a single `extend` call adds another 7 days while it's still active (handy when a shipment confirmation arrives weeks later).

<Note>
  Need a permanent address on your own domain instead? `POST /email/inboxes`
  provisions a [persistent encrypted inbox](https://docs.palmyr.ai/services/email).
</Note>

Cards follow [Laso's USA prepaid card rules](/guides/making-a-purchase) (US merchants, non-reloadable), and limits mirror Laso's: max 6 cards per agent per rolling 24 hours. Failed card purchases are refunded automatically.

## 3. Run the checkout

Example prompts:

<AccordionGroup>
  <Accordion title="Buy something online in the U.S.">
    ```
    I need you to buy [item] from [store]. First, navigate to the store, add
    the item to cart, and go to checkout to find the exact total (including tax
    and shipping). Create a disposable inbox with Palmyr's x402 API
    (POST https://palmyr.ai/email/temp) for the order confirmation, then order a
    prepaid card for exactly the total (POST https://palmyr.ai/cards/buy
    {"amount": total}). Poll the operation until the card is ready, read the
    card details, and complete the checkout using the card and the inbox
    address. Poll the inbox for the order confirmation and give me the order
    number. Ship to: [address].
    ```
  </Accordion>

  <Accordion title="Sign up for a service that texts a verification code">
    ```
    Sign up for [service] as [name]. Buy a US phone number from Palmyr
    (POST https://palmyr.ai/phone/numbers), enter it in the signup form, then
    call POST https://palmyr.ai/phone/numbers/{id}/wait-otp — it blocks until
    the SMS arrives and returns the parsed code. Enter the code to finish
    verification. If you reuse a number across signups, pass lookback_s=0 so
    an old code is never re-served.
    ```
  </Accordion>

  <Accordion title="Check a card's balance later">
    ```
    Check the remaining balance on my Palmyr card [card_id]: call
    POST https://palmyr.ai/cards/{card_id}/refresh for the live balance and
    recent transactions. GET /cards/{card_id} re-fetches the full card details
    any time — only the wallet that bought the card can read them.
    ```
  </Accordion>
</AccordionGroup>

<Tip>
  Point your agent at [palmyr.ai/skill.md](https://palmyr.ai/skill.md) and it
  can figure the rest out on its own.
</Tip>

## Use it over MCP

Palmyr also runs a hosted MCP server — point any MCP client at `https://palmyr.ai/mcp`.

Relevant tools:

* Cards: [`card_buy`](https://docs.palmyr.ai/services/card#api), [`card_status`](https://docs.palmyr.ai/services/card#api), [`card_get`](https://docs.palmyr.ai/services/card#api)
* Email: [`email_create_temp`, `email_extend_temp`, `email_read_messages`](https://docs.palmyr.ai/services/email)
* Phone: [`phone_buy_number`, `wait_for_otp`](https://docs.palmyr.ai/services/phone)

The first call to a paid tool returns x402 payment instructions as a normal result; sign and call again with the `payment` argument.

<Card title="Palmyr" icon="globe" href="https://palmyr.ai">
  Full documentation, pricing, and the agent skill file.
</Card>
