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

# Get User Balance

> This endpoint retrieves the current balance for a user's account

### Params

<ParamField path="userId" type="string" required>
  The unique user identifier
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates whether the call was successful
</ResponseField>

<ResponseField name="userId" type="string">
  The unique user identifier
</ResponseField>

<ResponseField name="balance" type="number">
  Current available balance
</ResponseField>

<ResponseField name="currency" type="string">
  Currency code (e.g., "USD")
</ResponseField>

<ResponseField name="pendingBalance" type="number">
  Balance pending from unsettled transactions
</ResponseField>

<ResponseField name="updatedAt" type="string">
  ISO 8601 timestamp when the balance was last updated
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request GET 'https://stablecoin-api.sandbox.getmeru.com/api/v1/cards-program/users/3ddd0e5b-6276-4b48-b756-c1fcc9a2efd1/balance' \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>'
  ```

  ```js Javascript theme={null}
  const response = await fetch('https://stablecoin-api.sandbox.getmeru.com/api/v1/cards-program/users/3ddd0e5b-6276-4b48-b756-c1fcc9a2efd1/balance', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
      'api-key': '<api-key>'
    }
  });

  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "userId": "3ddd0e5b-6276-4b48-b756-c1fcc9a2efd1",
    "balance": 1250.75,
    "currency": "USD",
    "pendingBalance": 45.99,
    "updatedAt": "2024-01-17T15:45:00Z"
  }
  ```
</ResponseExample>

### Error Responses

<ResponseExample>
  ```json 401 theme={null}
  {
    "success": false,
    "error": "Unauthorized. Please check your authentication credentials."
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "error": "User not found."
  }
  ```
</ResponseExample>
