> For the complete index of the 402pay docs, see [llms.txt](https://developer.402pay.co/llms.txt).

# Update the wallet

Rename your wallet.

`PATCH https://dash.402pay.co/api/v1/wallet`

Only the name changes here. Everything else comes from the wallet's keys, and creating, restoring or deleting a wallet takes a person signed in to the dashboard, where any recovery phrase stays in their browser.

### Body

- `name` (string): From 2 to 40 characters, shown in the dashboard.

### Errors

- 400 `invalid_request` A field is missing, unknown or out of range. `field` names it.
- 404 `not_found` Your business has no wallet yet.

Any request can also fail on its key or its body. See [errors](https://developer.402pay.co/api/errors.md).

Request, cURL:

```bash
curl -X PATCH "https://dash.402pay.co/api/v1/wallet" \
  -H "Authorization: Bearer $PAY402_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Treasury"
  }'
```

Request, Node.js:

```js
const response = await fetch("https://dash.402pay.co/api/v1/wallet", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.PAY402_SECRET_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Treasury"
  }),
});
const { data } = await response.json();
```

Request, Python:

```python
import os

import requests

response = requests.patch(
    "https://dash.402pay.co/api/v1/wallet",
    headers={
        "Authorization": f"Bearer {os.environ['PAY402_SECRET_KEY']}",
    },
    json={
        "name": "Treasury"
    },
)
data = response.json()["data"]
```

Response, 200 OK:

```json
{
  "data": {
    "id": "wal_1fIGZOrILmsCO0jw",
    "kind": "wallet",
    "name": "Treasury",
    "source": "created",
    "total_value_usd": 9544239,
    "balances": [
      {
        "asset": "USDC",
        "network": "polygon",
        "amount": "28814.47",
        "price_usd": 100,
        "value_usd": 2881447
      },
      {
        "asset": "USDT",
        "network": "tron",
        "amount": "22995.72",
        "price_usd": 100,
        "value_usd": 2299572
      },
      {
        "asset": "BTC",
        "network": "bitcoin",
        "amount": "0.17992045",
        "price_usd": 9840000,
        "value_usd": 1770417
      },
      {
        "asset": "SOL",
        "network": "solana",
        "amount": "47.4820",
        "price_usd": 18400,
        "value_usd": 873669
      },
      {
        "asset": "USDC",
        "network": "solana",
        "amount": "7099.29",
        "price_usd": 100,
        "value_usd": 709929
      },
      {
        "asset": "USDC",
        "network": "ethereum",
        "amount": "6177.58",
        "price_usd": 100,
        "value_usd": 617758
      },
      {
        "asset": "ETH",
        "network": "ethereum",
        "amount": "0.836580",
        "price_usd": 362000,
        "value_usd": 302842
      },
      {
        "asset": "USDT",
        "network": "ethereum",
        "amount": "886.05",
        "price_usd": 100,
        "value_usd": 88605
      }
    ],
    "main_addresses": {
      "ethereum": "0x82DD86f0f1CC201A49EEaf01C1980A6D66AaEb86",
      "polygon": "0x82DD86f0f1CC201A49EEaf01C1980A6D66AaEb86",
      "solana": "2YJtPr25BcbApPPAXHyAu9USMS3z8KSepTbBx9N3YMgp",
      "tron": "TFtTqBsPS39pnxMaHVzKHYuCurEgof2wDG",
      "bitcoin": "bc1qp932jy8gqh9zn62ef2azjnh5gpvk0hv40jfmpx"
    },
    "address_counts": {
      "evm": 118,
      "tron": 37,
      "bitcoin": 24,
      "solana": 46
    },
    "pending_change": null,
    "created_at": "2026-05-09T21:22:00.813Z"
  }
}
```
