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

# User Services

> Retrieve and manage user profile information, KYC status, and deposit limits using the Monei Node.js / TypeScript SDK.

# Overview

The `monei.user` service allows you to manage the authenticated user's profile, verify KYC status, and retrieve account limits.

This service provides:

* Retrieve current authenticated user
* Update user profile
* Check KYC verification status
* Get deposit limits

***

## Get Current User

Retrieve details of the authenticated user.

```typescript theme={null}
const user = await monei.user.getCurrentUser();

console.log(user.id);
console.log(user.email);
console.log(user.status);
```

***

## Update User

Update a user's profile information.

```typescript theme={null}
const updatedUser = await monei.user.updateUser("user_123", {
  firstName: "John",
  lastName: "Doe"
});

console.log(updatedUser);
```

***

## Get KYC Status

Check the user's KYC verification status.

```typescript theme={null}
const kyc = await monei.user.kycStatus();

console.log(kyc.status);
console.log(kyc.level);
```

***

## Get Deposit Limits

Retrieve the user's deposit limits based on KYC level.

```typescript theme={null}
const limits = await monei.user.getDepositLimit();

console.log(limits);
```

***

## Working with Response Objects

All methods return objects with property access:

```typescript theme={null}
// Get current user response
const user = await monei.user.getCurrentUser();
console.log(user.id);           // User ID
console.log(user.email);        // Email address
console.log(user.firstName);    // First name
console.log(user.lastName);     // Last name
console.log(user.status);       // User status
console.log(user.createdAt);    // Account creation date

// Update user response
const updatedUser = await monei.user.updateUser("user_123", {
  firstName: "John",
  lastName: "Doe"
});
console.log(updatedUser.id);         // User ID
console.log(updatedUser.firstName);  // Updated first name
console.log(updatedUser.lastName);   // Updated last name
console.log(updatedUser.updatedAt);  // Last update timestamp

// KYC status response
const kyc = await monei.user.kycStatus();
console.log(kyc.status);        // pending | verified | rejected
console.log(kyc.level);         // KYC level (0, 1, 2)
console.log(kyc.submittedAt);   // When KYC was submitted
console.log(kyc.verifiedAt);    // When KYC was verified (if verified)

// Deposit limits response
const limits = await monei.user.getDepositLimit();
console.log(limits.dailyLimit);       // Daily deposit limit
console.log(limits.monthlyLimit);     // Monthly deposit limit
console.log(limits.usedToday);        // Amount used today
console.log(limits.usedThisMonth);    // Amount used this month
console.log(limits.remainingToday);   // Remaining daily limit
```

***

# Error Handling

All user service calls may throw an error if the request fails.

```typescript theme={null}
import { MoneiError } from 'monei-sdk';

try {
  const user = await monei.user.getCurrentUser();
  console.log(user.email);
} catch (error) {
  if (error instanceof MoneiError) {
    console.error(error.statusCode);  // HTTP status code
    console.error(error.message);     // Error message
    console.error(error.code);        // Error code
  }
}
```

***

## Service Overview

| Method                 | Description                         |
| ---------------------- | ----------------------------------- |
| `getCurrentUser()`     | Retrieve authenticated user profile |
| `updateUser(id, data)` | Update user profile                 |
| `kycStatus()`          | Get KYC verification status         |
| `getDepositLimit()`    | Retrieve deposit limits             |

***

## Notes

* All methods require a properly configured `MoneiClient` instance with authentication
* User ID is required for update operations
* KYC status affects deposit limits and available features
* All responses are strongly typed objects with property access
* Deposit limits are returned in kobo (1 NGN = 100 kobo)

***
