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

# Retrieve a Subscription collection



## OpenAPI

````yaml get /subscriptions
openapi: 3.0.0
info:
  title: Hub2 Service · Api
  description: |-
    This is the Hub2 api reference |
          Please check https://docs.hub2.io/ for the full documentation |
          Rate limits of endpoints are here : https://docs.hub2.io/en/details/limits.html.
  version: 2.185.0
  contact:
    name: Hub2
    url: https://www.hub2.io/
    email: contact@hub2.io
servers: []
security: []
tags:
  - name: Payments
    description: >-
      Best known as the PAY-IN API, it provides endpoints for merchants to
      perform Hub2 PAY-IN transactions.
  - name: Transfers
    description: >-
      Best known as the PAY-OUT API, it provides endpoints for merchants to
      perform Hub2 PAY-OUT transactions.
  - name: IRT
    description: International Remittance Transfers
  - name: Balance
    description: ''
  - name: Webhooks
    description: ''
  - name: Provisioning
    description: ''
  - name: Payment on Terminal
    description: ''
  - name: Receipt
    description: ''
  - name: Sms
    description: ''
  - name: Data
    description: ''
  - name: Compliance
    description: ''
  - name: Recipient
    description: ''
  - name: Delegation
    description: ''
  - name: Deposits
    description: ''
  - name: Payment Links
    description: ''
  - name: Subscription Links
    description: ''
  - name: Submerchants
    description: ''
  - name: Bill Payments
    description: ''
  - name: Subscriptions
    description: ''
  - name: Subscription Intents
    description: >-
      Enrolls a customer in card-on-file recurring debits and tracks how each
      enrollment ended.
  - name: Instant Payment
    description: >-
      Instant payment (PI SPI, BCEAO) resources, such as the aliases naming your
      accounts in the national directory.
paths:
  /subscriptions:
    get:
      tags:
        - Subscriptions
      summary: Retrieve a Subscription collection
      operationId: SubscriptionsController_list
      parameters:
        - name: customerId
          required: false
          in: query
          description: Exact match on the merchant customer reference.
          schema:
            type: string
        - name: billingMode
          required: false
          in: query
          schema:
            type: string
            enum:
              - rbs_scheduled
              - merchant_initiated
        - name: status
          required: false
          in: query
          schema:
            type: string
            enum:
              - created
              - pending
              - active
              - delinquent
              - suspended
              - cancelled
              - completed
        - name: page
          required: false
          in: query
          description: |-
            The page number in the returned data. The default value is 1.
                Do use with 'perPage' query parameter to paginate properly.
          schema:
            example: 2
            type: number
        - name: perPage
          required: false
          in: query
          description: >-
            The maximum number of results that will be return. The default value
            is 10.
                Do use with 'page' query parameter to paginate properly.
          schema:
            example: 5
            type: number
        - name: ApiKey
          in: header
          description: >-
            Your api key. To create a key, please get into our dashboard. If you
            don't have access to it, please reach the Support team.
          required: true
          schema:
            type: string
        - name: MerchantId
          in: header
          description: >-
            Your merchant ID. This information is available in our dashboard. If
            you don't have access to it, please reach the Support team.
          required: true
          schema:
            type: string
        - name: Environment
          in: header
          description: >-
            Allow you to choose between the sandbox mode to perform some tests
            or the live mode for real world transactions.
          required: true
          schema:
            type: string
            enum:
              - live
              - sandbox
      responses:
        '200':
          headers:
            Content-Range:
              description: >-
                Indicate the response's range. Follow the format :
                start-end/total
              example: 5-9/16
              schema:
                type: string
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionResponseDto'
        '401':
          description: Wrong credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiUnauthorizedErrorAlias'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiInternalErrorAlias'
components:
  schemas:
    SubscriptionResponseDto:
      type: object
      properties:
        id:
          type: number
          description: >-
            Subscription identifier — pass this into the
            cancel/suspend/charge/transactions endpoints.
        cybersourceSubscriptionId:
          type: object
          nullable: true
          description: >-
            Same value received as `subscriptionId` in the
            `subscription.created` webhook payload. Null for a
            merchant_initiated subscription — there is no RBS-side subscription.
        status:
          type: string
          enum:
            - created
            - pending
            - active
            - delinquent
            - suspended
            - cancelled
            - completed
        billingMode:
          type: string
          enum:
            - rbs_scheduled
            - merchant_initiated
          description: >-
            rbs_scheduled — debited on a schedule by Cybersource RBS;
            merchant_initiated — charged on demand via POST
            /subscriptions/{id}/charge.
        frequency:
          type: string
          enum:
            - weekly
            - monthly
          nullable: true
          description: >-
            Null for a merchant_initiated subscription — charges are on-demand,
            not scheduled.
        amount:
          type: object
          nullable: true
          description: >-
            Null for a merchant_initiated subscription — charge amounts are
            per-call, not fixed.
        currency:
          type: string
        startDate:
          type: object
          nullable: true
          description: Null for a merchant_initiated subscription.
        customerId:
          type: string
        createdAt:
          format: date-time
          type: string
      required:
        - id
        - cybersourceSubscriptionId
        - status
        - billingMode
        - frequency
        - amount
        - currency
        - startDate
        - customerId
        - createdAt
    ApiUnauthorizedErrorAlias:
      type: object
      properties:
        status:
          type: number
          description: HTTP error code.
          example: 401
        error:
          description: HTTP error description.
          allOf:
            - $ref: '#/components/schemas/InternalApiUnauthorizedError'
      required:
        - status
        - error
    ApiInternalErrorAlias:
      type: object
      properties:
        type:
          type: string
          description: The type of this error.
          example: internal_error
        code:
          type: string
          description: The error code for this error.
          example:
            - internal_error
            - wrong_credentials
            - not_granted
            - live_mode_not_granted
        message:
          type: string
          description: The error message describing what happens to throw this error.
          example: An error occurred on our system. Please try again later.
      required:
        - type
        - code
        - message
    InternalApiUnauthorizedError:
      type: object
      properties:
        type:
          type: string
          description: The type of this error.
          example: authorization_error
        code:
          type: string
          description: The internal error code describing what happened.
          enum:
            - bad_payment_intent_token
            - wrong_credentials
          example: wrong_credentials
        message:
          type: string
          description: Detailed error message which describe what happened.
          example: L'ID marchand et/ou la clé d'API sont incorrects.
      required:
        - type
        - code
        - message

````

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