# CustomerManager (https://dev.cosmospay.lat/docs/sdk/definitions/server/customer-manager/)

> Manages customers — client.customers. Reference for the CustomerManager class of @cosmosapp/pay_sdk: its members and their signatures.

Manages customers — `client.customers`.

## Methods

### create()

Create a customer.

```ts
create(options: CreateCustomerOptions): Promise<Customer>
```

**Parameters**

- `options`: `CreateCustomerOptions`

**Returns** [`Promise<Customer>`](https://dev.cosmospay.lat/docs/sdk/definitions/server/customer/)

### list()

List the consumer's customers (with payment stats).

```ts
list(): Promise<Customer[]>
```

**Returns** [`Promise<Customer[]>`](https://dev.cosmospay.lat/docs/sdk/definitions/server/customer/)

### fetch()

Get a customer by id.

```ts
fetch(id: string): Promise<Customer>
```

**Parameters**

- `id`: `string`

**Returns** [`Promise<Customer>`](https://dev.cosmospay.lat/docs/sdk/definitions/server/customer/)

### update()

Update a customer.

```ts
update(id: string, options: UpdateCustomerOptions): Promise<Customer>
```

**Parameters**

- `id`: `string`
- `options`: `UpdateCustomerOptions`

**Returns** [`Promise<Customer>`](https://dev.cosmospay.lat/docs/sdk/definitions/server/customer/)

### delete()

Delete a customer.

```ts
delete(id: string): Promise<CustomerDeletedData>
```

**Parameters**

- `id`: `string`

**Returns** `Promise<CustomerDeletedData>`

### addWallet()

Add a wallet to a customer, on Stellar, Solana or Monad (up to 20 per customer); payments paid from it count toward the customer. A wallet the customer already holds answers as it is; one another of your customers holds is `409 customer_wallet_taken`.

```ts
addWallet(customerId: string, options: AddCustomerWalletOptions): Promise<CustomerWalletData>
```

**Parameters**

- `customerId`: `string`
- `options`: `AddCustomerWalletOptions`

**Returns** `Promise<CustomerWalletData>`

### removeWallet()

Remove a wallet from a customer. Payments from that address stop counting toward it, and a later settled payment from it adds it as a new automatic customer. A `walletId` that is not one of this customer's wallets is 404.

```ts
removeWallet(customerId: string, walletId: string): Promise<CustomerWalletDeletedData>
```

**Parameters**

- `customerId`: `string`
- `walletId`: `string`

**Returns** `Promise<CustomerWalletDeletedData>`

## Related

- [Customer](https://dev.cosmospay.lat/docs/sdk/definitions/server/customer/)
- [BaseManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/base-manager/)
