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

# Wallet API quickstart

> Activate a chain, generate a key, and issue your first user address in two API calls.

This guide issues one address on Base for a user in your own product.

<Steps>
  <Step title="Activate Base">
    Open **Dashboard → Wallets** and activate Base. This only needs to happen once per chain — every address you create afterward on that chain is issued under it.
  </Step>

  <Step title="Generate a key">
    On the same page, create a new API key. It's shown once, in a copy-once banner:

    ```text theme={null}
    wsk_live_a1b2c3d4e5f6...
    ```

    Store it as a backend environment variable.
  </Step>

  <Step title="Create an address">
    Call the create-wallet endpoint with a reference for your user, any string you'll recognize later (your own user ID works well).

    ```bash theme={null}
    curl -X POST https://merchant.minisend.xyz/api/v1/wallets \
      -H "Authorization: Bearer wsk_live_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{"walletRef": "user-9214"}'
    ```

    ```json theme={null}
    {
      "wallet": {
        "id": "3f6b2e1a-...",
        "wallet_ref": "user-9214",
        "address": "0xabc1230000000000000000000000000000dead",
        "chain": "BASE",
        "status": "active",
        "mode": "live",
        "metadata": null,
        "created_at": "2026-07-29T09:00:00.000Z"
      }
    }
    ```

    Store `address` against your user. It's the address they can send to or hold funds at.
  </Step>

  <Step title="Reuse the same reference safely">
    Calling the same request again, with the same `walletRef`, returns the same wallet instead of creating a second one — safe to call from a signup flow without checking first whether the user already has an address.
  </Step>
</Steps>

## Issuing on another chain

Once a chain is activated, pass it explicitly:

```bash theme={null}
curl -X POST https://merchant.minisend.xyz/api/v1/wallets \
  -H "Authorization: Bearer wsk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"walletRef": "user-9214", "chain": "ARB"}'
```

A `walletRef` can have one address per chain — creating it on Base and then on Arbitrum gives your user two independent addresses, not one shared across chains.

<Note>
  Attaching `metadata` (any JSON object) to a wallet at creation is useful for storing your own context — an order ID, a plan tier, anything you'll want back later when you fetch the wallet.
</Note>
