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

# List Subscriptions

> The "List Subscriptions" API allows to retrieve a paginated list of subscriptions. Customize your results by filtering subscriptions based on name, alt type, subscription status, payment mode, date range, type of source, contact, subscription id, entity id, contact or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve subscription information.



## OpenAPI

````yaml /api-reference/payments/openapi.json get /payments/subscriptions
openapi: 3.0.0
info:
  title: Payments API
  description: Documentation for payments API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Payments
    description: Documentation for payments API
  - name: Integrations
    description: Documentation for payments API
  - name: Orders
    description: Documentation for payments API
  - name: Order fulfillments
    description: Documentation for payments API
  - name: Order Notes
    description: Documentation for payments API
  - name: Transactions
    description: Documentation for payments API
  - name: Subscriptions
    description: Documentation for payments API
  - name: Coupons
    description: Documentation for payments API
  - name: Custom Provider
    description: Documentation for payments API
paths:
  /payments/subscriptions:
    get:
      tags:
        - Subscriptions
      summary: List Subscriptions
      description: >-
        The "List Subscriptions" API allows to retrieve a paginated list of
        subscriptions. Customize your results by filtering subscriptions based
        on name, alt type, subscription status, payment mode, date range, type
        of source, contact, subscription id, entity id, contact or paginate
        through the list using the provided query parameters. This endpoint
        provides a straightforward way to explore and retrieve subscription
        information.
      operationId: list-subscriptions
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
        - name: altId
          required: true
          in: query
          description: 'AltId is the unique identifier e.g: location id.'
          schema:
            example: 3SwdhCu3svxI8AKsPJt6
            type: string
        - name: altType
          required: true
          in: query
          description: AltType is the type of identifier.
          schema:
            example: location
            enum:
              - location
            type: string
        - name: entityId
          required: false
          in: query
          description: Entity id for filtering of subscriptions.
          schema:
            example: 61dd0fe9c077f73e67f78803
            type: string
        - name: paymentMode
          required: false
          in: query
          description: Mode of payment.
          schema:
            example: live
            type: string
        - name: startAt
          required: false
          in: query
          description: Starting interval of subscriptions.
          schema:
            example: '2024-02-01'
            type: string
        - name: endAt
          required: false
          in: query
          description: Closing interval of subscriptions.
          schema:
            example: '2024-02-13'
            type: string
        - name: entitySourceType
          required: false
          in: query
          description: Source of the subscriptions.
          schema:
            example: funnel
            type: string
        - name: search
          required: false
          in: query
          description: The name of the subscription for searching.
          schema:
            example: Awesome subscription
            type: string
        - name: contactId
          required: false
          in: query
          description: Contact ID for the subscription
          schema:
            example: AmuzcoPBpgKeccNsFlib
            type: string
        - name: id
          required: false
          in: query
          description: Subscription id for filtering of subscriptions.
          schema:
            example: 64bf78af39118e4011926cba
            type: string
        - name: limit
          required: false
          in: query
          description: >-
            The maximum number of items to be included in a single page of
            results
          schema:
            default: 10
            example: 20
            type: number
        - name: offset
          required: false
          in: query
          description: >-
            The starting index of the page, indicating the position from which
            the results should be retrieved.
          schema:
            default: 0
            example: 0
            type: number
        - name: getPaymentsCollectedCount
          required: false
          in: query
          description: Get the total payments collected for the subscription.
          schema:
            example: 'true'
            type: boolean
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSubscriptionResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - Location-Access:
            - payments/subscriptions.readonly
components:
  schemas:
    ListSubscriptionResponseDto:
      type: object
      properties:
        data:
          description: An array of subscriptions
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionResponseSchema'
        totalCount:
          type: number
          description: total subscriptions count
      required:
        - data
        - totalCount
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          type: array
          items:
            type: string
          example:
            - Unprocessable Entity
        error:
          type: string
          example: Unprocessable Entity
      required:
        - statusCode
        - message
        - error
    SubscriptionResponseSchema:
      type: object
      properties:
        _id:
          type: string
          description: The unique identifier for the subscription.
          example: 64bf78af39118e4011926cba
        altId:
          type: string
          description: 'AltId is the unique identifier eg: location id.'
          example: 3SwdhCu3svxI8AKsPJt6
        altType:
          type: string
          example: location
          description: AltType is the type of identifier.
          enum:
            - location
        contactId:
          type: string
          example: XPLSw2SVagl12LMDeTmQ
          description: Contact id corresponding to the subscription.
        contactName:
          type: string
          example: James Bond
          description: Contact name corresponding to the subscription.
        contactEmail:
          type: string
          example: james.bond@hoopai.com
          description: Contact email corresponding to the subscription.
        currency:
          type: string
          example: USD
          description: Currency in which subscription occurred.
        amount:
          type: number
          example: '100'
          description: Subscription value.
        status:
          type: object
          description: The status of the subscription (e.g., succeeded).
          example: active
        liveMode:
          type: boolean
          example: 'false'
          description: Subscription is in live / test mode.
        entityType:
          type: string
          example: order
          description: 'Entity type of subscription (eg: order).'
        entityId:
          type: string
          example: 62f4db0f3059ecee61379012
          description: 'Entity id for the subscription. e.g: order id'
        entitySourceType:
          type: string
          example: funnel
          description: 'Entity source type of subscription (eg: funnel).'
        entitySourceName:
          type: string
          example: Attribution Funnel
          description: Entity source name for the subscription.
        entitySourceId:
          type: string
          description: Entity source id for the subscription.
          example: bevrkPbLaDNXFaqfLKMm
        entitySourceMeta:
          type: object
          description: Meta content for the entity source of subscription.
          example: >-
            { domain: "app.hoopai.com", pageId:  "sxC4lNhFIavEnLZh5KhC",
            pageUrl:  "/v2/preview/sxC4lNhFIavEnLZh5KhC", stepId:
            "7d303d1f-cb85-403d-b548-bf01de5c7bb0" }
        subscriptionId:
          type: string
          example: I-0UE609H8E43P
          description: Subscription id for subscription.
        subscriptionSnapshot:
          type: object
          description: Snapshot of subscription.
          example: >-
            { status: "ACTIVE", status_update_time: "2022-08-16T11:06:53Z", id:
            "I-0UE609H8E43P", plan_id: "P-82K11750F0313430KMLRGE6Y", start_time:
            "2022-08-16T11:05:31Z", quantity: 1 }
        paymentProviderType:
          type: string
          example: stripe
          description: Payment provider for subscription.
        paymentProviderConnectedAccount:
          type: string
          example: >-
            ATn0CqrzrWS5ak185Bsb1xCpyzBDOZ8WdRxyFotppLYePTDhiuQ49H5QXO_L-4HKk1GBn7f9_QhbNK2s
          description: Payment provider connected account id for subscription.
        ipAddress:
          type: string
          example: 103.100.16.82
          description: Ip address from where subscription was initiated.
        createdAt:
          format: date-time
          type: string
          description: The creation timestamp of the subscription.
          example: '2023-11-20T10:23:36.515Z'
        updatedAt:
          format: date-time
          type: string
          description: The update timestamp of the subscription.
          example: '2023-11-20T10:23:36.515Z'
        createdBy:
          type: string
          example: user123
          description: User ID who created the subscription.
      required:
        - _id
        - altId
        - altType
        - status
        - entitySourceType
        - createdAt
        - updatedAt

````