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

# List customer subscriptions

> Read a customer's plan history and renewal state with a scoped API key.

Pass the exact opaque `customerId` as a URL-encoded query value. The API key selects the organization and Sandbox or Live environment. Results are ordered newest first and can be paged with `limit` and the returned `nextCursor`; `hasMore` indicates that older rows remain.

Each item identifies the plan, status, creation time, and current billing period. Active paid subscriptions include a cancellation state when Stripe can verify it. If that state is unavailable, do not infer that renewal is enabled from a local `active` status. Use [Stop or resume renewal](https://docs.integrateledger.com/api-reference/customers/cancellation.md) to change a verified paid subscription. Free and pending Checkout subscriptions cannot be managed through that endpoint.

Use [Get a customer](https://docs.integrateledger.com/api-reference/customers/get.md) for the current credit balance. A customer's separately purchased credit packs appear under [List customer purchases](https://docs.integrateledger.com/api-reference/customers/purchases.md).


## OpenAPI

````yaml openapi.json GET /v1/customers/subscriptions
openapi: 3.1.0
info:
  title: Ledger API
  version: 0.1.0
servers:
  - url: https://api.integrateledger.com
    description: Hosted Ledger API
security: []
paths:
  /v1/customers/subscriptions:
    get:
      tags:
        - Customers
      summary: List a customer's subscriptions
      operationId: listCustomerSubscriptions
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 255
          required: true
          name: customerId
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          required: false
          name: limit
          in: query
        - schema:
            type: integer
            exclusiveMinimum: 0
            maximum: 2147483647
          required: false
          name: cursor
          in: query
      responses:
        '200':
          description: Customer subscriptions, newest first
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerSubscriptionPage'
        '400':
          description: Invalid query
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerError'
        '401':
          description: Missing or invalid Ledger API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerError'
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerError'
      security:
        - ApiKey: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl --request GET
            'https://api.integrateledger.com/v1/customers/subscriptions?customerId=user_123'
            \
              -H "Authorization: Bearer $LEDGER_API_KEY"
        - lang: python
          label: Python SDK (source only)
          source: |-
            import os
            from ledger_sdk import Ledger

            ledger = Ledger(api_key=os.environ["LEDGER_API_KEY"])
            ledger.list_customer_subscriptions(customer_id="user_123")
        - lang: typescript
          label: TypeScript SDK (source only)
          source: >-
            import { Ledger } from "@ledger/sdk";


            const ledger = new Ledger({ apiKey: process.env.LEDGER_API_KEY ?? ""
            });

            await ledger.listCustomerSubscriptions({ customerId: "user_123" });
components:
  schemas:
    CustomerSubscriptionPage:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/CustomerSubscriptionItem'
        hasMore:
          type: boolean
        nextCursor:
          type: integer
          nullable: true
      required:
        - items
        - hasMore
        - nextCursor
    CustomerError:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    CustomerSubscriptionItem:
      type: object
      properties:
        id:
          type: integer
        planId:
          type: string
        planName:
          type: string
        monthlyPriceCents:
          type: integer
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        currentPeriodStart:
          type: string
          nullable: true
          format: date-time
        currentPeriodEnd:
          type: string
          nullable: true
          format: date-time
        cancellation:
          $ref: '#/components/schemas/CustomerSubscriptionCancellation'
      required:
        - id
        - planId
        - planName
        - monthlyPriceCents
        - status
        - createdAt
        - currentPeriodStart
        - currentPeriodEnd
        - cancellation
    CustomerSubscriptionCancellation:
      type: object
      nullable: true
      properties:
        cancelAtPeriodEnd:
          type: boolean
        scheduledEnd:
          type: boolean
        manageable:
          type: boolean
        cancelsAt:
          type: string
          nullable: true
          format: date-time
      required:
        - cancelAtPeriodEnd
        - scheduledEnd
        - manageable
        - cancelsAt
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer

````

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