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

# Get organization active prepaid balances

> **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the active prepaid credit balances for the organization, each with its own balance ID and remaining credits, along with the total remaining credits across all active balances. A balance is active when it has started, has not expired, and has credits remaining. Balances are ordered by expiration date, soonest first, and the returned page is capped at `limit` (default and maximum 100). When `totalCount` exceeds the number of returned balances, page with `limit`/`offset` to retrieve them all. `totalRemainingPrepaidCredits` always covers every active balance, not just the returned page.

<span data-endpoint-badge="Beta"><Badge color="blue">Beta</Badge></span>

**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the active prepaid credit balances for the organization, each with its own balance ID and remaining credits, along with the total remaining credits across all active balances. A balance is active when it has started, has not expired, and has credits remaining. Balances are ordered by expiration date, soonest first, and the returned page is capped at `limit` (default and maximum 100). When `totalCount` exceeds the number of returned balances, page with `limit`/`offset` to retrieve them all. `totalRemainingPrepaidCredits` always covers every active balance, not just the returned page.


## OpenAPI

````yaml _specs/cloud-openapi.json GET /v1/organizations/{organizationId}/activeBalances
openapi: 3.1.2
info:
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
  contact:
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-1046231
    email: support@clickhouse.com
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: User management
  - name: Billing
  - name: Role Management
  - name: Service
  - name: Backup
  - name: OpenAPI
  - name: Prometheus
  - name: ClickPipes
  - name: ClickStack
  - name: Postgres
  - name: UDF
paths:
  /v1/organizations/{organizationId}/activeBalances:
    get:
      tags:
        - Billing
      summary: Get organization active prepaid balances
      description: >-
        **This endpoint is in beta.** API contract is stable, and no breaking
        changes are expected in the future. <br /><br /> Returns the active
        prepaid credit balances for the organization, each with its own balance
        ID and remaining credits, along with the total remaining credits across
        all active balances. A balance is active when it has started, has not
        expired, and has credits remaining. Balances are ordered by expiration
        date, soonest first, and the returned page is capped at `limit` (default
        and maximum 100). When `totalCount` exceeds the number of returned
        balances, page with `limit`/`offset` to retrieve them all.
        `totalRemainingPrepaidCredits` always covers every active balance, not
        just the returned page.
      operationId: activeBalancesGet
      parameters:
        - in: path
          name: organizationId
          description: ID of the requested organization.
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: limit
          description: Maximum number of results to return.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 100
        - in: query
          name: offset
          description: Number of results to skip before returning.
          schema:
            type: integer
            minimum: 0
            default: 0
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 200
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
                  result:
                    $ref: '#/components/schemas/ActiveBalances'
        '400':
          description: >-
            The request cannot be processed due to a client error. Please verify
            your request parameters and try again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 400
                  error:
                    type: string
                    description: Detailed error description.
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
        '500':
          description: >-
            An internal server error has occurred. If this issue persists,
            please contact ClickHouse Cloud support for assistance.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code.
                    example: 500
                  error:
                    type: string
                    description: Detailed error description.
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
components:
  schemas:
    ActiveBalances:
      properties:
        totalRemainingPrepaidCredits:
          description: >-
            Total remaining credits across all active prepaid balances, in
            ClickHouse Credits (CHCs).
          type: number
        prepaidBalances:
          type: array
          description: List of active prepaid balances for the organization.
          items:
            $ref: '#/components/schemas/ActiveBalance'
    ActiveBalance:
      properties:
        id:
          description: Unique ID of the prepaid balance.
          type: string
          format: uuid
        remainingPrepaidCredits:
          description: >-
            Remaining credits available on this balance, in ClickHouse Credits
            (CHCs).
          type: number
        totalAmount:
          description: Total credits granted on this balance, in ClickHouse Credits (CHCs).
          type: number
        amountSpent:
          description: Credits spent from this balance, in ClickHouse Credits (CHCs).
          type: number
        startDate:
          description: Date the balance became active. ISO-8601, based on the UTC timezone.
          type: string
          format: date-time
        expirationDate:
          description: Date the balance expires. ISO-8601, based on the UTC timezone.
          type: string
          format: date-time
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Use key ID and key secret obtained in ClickHouse Cloud console:
        https://clickhouse.com/docs/cloud/manage/openapi

````