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

# FetchPolarUsage

[**@ai-billing/nextjs**](https://www.narev.ai/docs/ai-billing/reference/nextjs/typedoc/index.md)

***

[@ai-billing/nextjs](https://www.narev.ai/docs/ai-billing/reference/nextjs/typedoc/index.md) / [server](https://www.narev.ai/docs/ai-billing/reference/nextjs/typedoc/server/index) / fetchPolarUsage

# Function: fetchPolarUsage()

> **fetchPolarUsage**(`_userId`): `Promise`\<[`PolarUsageData`](https://www.narev.ai/docs/ai-billing/reference/nextjs/typedoc/server/interfaces/PolarUsageData)>

Defined in: [packages/nextjs/src/polar/fetchPolarUsage.ts:9](https://github.com/narevai/ai-billing/blob/main/packages/nextjs/src/polar/fetchPolarUsage.ts#L9)

Fetches usage data for a given user. (Mocked implementation)

## Parameters

### \_userId

`string`

the end-user ID

## Returns

`Promise`\<[`PolarUsageData`](https://www.narev.ai/docs/ai-billing/reference/nextjs/typedoc/server/interfaces/PolarUsageData)>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.