# Create a sub-wallet

`POST https://morzepay.com/v1/wallets`

POST`/v1/wallets`

Creates a sub-wallet under one of your main wallets, usually one for each of your own customers. Main wallets are created in the dashboard.

Permission`wallets:write`

### Headers

`Idempotency-Key`stringheader

8–80 letters, digits, `-` or `_`. Lets you retry safely: the same key and body return the first answer and never move money twice. See [Idempotency](https://morzepay.com/docs/api#idempotency).

### Body

JSON, with `Content-Type: application/json`.

`parent_wallet_id`stringrequired

The main wallet this one sits under.

`name`stringrequired

2–120 characters, such as your customer’s name.

`external_ref`string

Your own id for this customer. Unique in your business, so you can find the wallet later with [List wallets](https://morzepay.com/docs/api/list-wallets).

`deposit_fee_bearer`string

Who pays the collection fee on payments into this wallet: `wallet` or `customer`. Defaults to the main wallet’s setting.

### Returns

The new wallet, with a balance of `0.00`.

### Errors

| Status | Code | When |
| 409 | DUPLICATE_EXTERNAL_REF | Another wallet already uses this external_ref. |
| 422 | INVALID_PARENT | The parent isn’t a main wallet. |
| 404 | WALLET_NOT_FOUND | The parent doesn’t exist, or the key can’t see it. |

The common codes, such as `UNAUTHENTICATED` and `RATE_LIMITED`, can come from any endpoint. See [Errors](https://morzepay.com/docs/api#errors).



## Example request

```bash
curl -X POST "https://morzepay.com/v1/wallets" \
  -H "Authorization: Bearer $MORZEPAY_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-shop-0192" \
  -d '{
  "parent_wallet_id": "wal_8fK2mQx7RtP4nVb9LcHs2w",
  "name": "Nakasero Pharmacy",
  "external_ref": "shop-0192",
  "deposit_fee_bearer": "customer"
}'
```

## Example response (201)

```json
{
  "success": true,
  "data": {
    "id": "wal_Zq4Hn8YtV2kPm6RbX3cLw9",
    "livemode": true,
    "kind": "sub",
    "parent_wallet_id": "wal_8fK2mQx7RtP4nVb9LcHs2w",
    "name": "Nakasero Pharmacy",
    "external_ref": "shop-0192",
    "currency": "UGX",
    "balance": "0.00",
    "deposit_fee_bearer": "customer",
    "status": "active",
    "created_at": "2026-10-04T14:20:11+03:00"
  }
}
```
