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

# List collections

> Retrieve a paginated list of payment collections for the authenticated merchant



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/bila/collections
openapi: 3.0.0
info:
  title: Bila Payment Gateway API
  description: |-

    Bila Payment Gateway API - A payment processing API for Africa.

    ## Overview

    This API provides payment gateway functionality for:
    - **Account Management**: Manage payment accounts/wallets
    - **Bank Operations**: Access bank reference data
    - **Account Resolution**: Verify bank and mobile money accounts
    - **Transfer Recipients**: Manage saved transfer recipients
    - **Transfers (Payouts)**: Send money to bank accounts and mobile money
    - **Collections (Receive Payments)**: Collect payments via mobile money
    - **Transaction History**: View all transactions

    ## Mobile Money Providers

    - Airtel Money
    - MTN Mobile Money (MoMo)
    - Zamtel Kwacha

    ## Countries Supported

    - Zambia (zm)
    - Nigeria (ng)

    ## Authentication

    Use your merchant API key in the `x-api-key` header.
    You can generate API keys from your merchant dashboard.

    ## Base URL

    ```
    https://api.usebila.com/api/v1
    ```

    For sandbox/testing:
    ```
    https://sandbox.usebila.com/api/v1
    ```
        
  version: '2.0'
  contact: {}
servers:
  - url: https://api.usebila.com
    description: Production
  - url: https://sandbox.usebila.com
    description: Sandbox
security:
  - x-api-key: []
tags:
  - name: Accounts
    description: Account/wallet management endpoints
  - name: Banks
    description: Bank reference data endpoints
  - name: Resolve
    description: Account resolution/verification endpoints
  - name: Transfer Recipients
    description: Transfer recipient management endpoints
  - name: Transfers
    description: Payout/transfer operation endpoints
  - name: Collections
    description: Payment collection operation endpoints
  - name: Transactions
    description: Transaction history endpoints
  - name: Webhooks
    description: Webhook configuration and delivery history
paths:
  /api/v1/bila/collections:
    get:
      tags:
        - Collections
      summary: List collections
      description: >-
        Retrieve a paginated list of payment collections for the authenticated
        merchant
      operationId: BilaCollectionsController_getCollections
      parameters:
        - name: page
          required: false
          in: query
          description: 'Page number (default: 1)'
          schema:
            minimum: 1
            example: 1
            type: number
        - name: perPage
          required: false
          in: query
          description: 'Items per page (default: 50)'
          schema:
            minimum: 1
            maximum: 100
            example: 50
            type: number
        - name: status
          required: false
          in: query
          description: Filter by collection status
          schema:
            type: string
            enum:
              - pending
              - successful
              - failed
              - otp-required
              - pay-offline
        - name: accountId
          required: false
          in: query
          description: Filter by account ID
          schema:
            example: 68f11209-451f-4a15-bfcd-d916eb8b09f4
            type: string
        - name: startDate
          required: false
          in: query
          description: Filter by start date (ISO 8601)
          schema:
            example: '2024-01-01T00:00:00Z'
            type: string
        - name: endDate
          required: false
          in: query
          description: Filter by end date (ISO 8601)
          schema:
            example: '2024-12-31T23:59:59Z'
            type: string
      responses:
        '200':
          description: Collections retrieved successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BilaResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/PaginatedCollectionsResponseDto'
        '400':
          description: Bad request
      security:
        - x-api-key: []
components:
  schemas:
    BilaResponseDto:
      type: object
      properties:
        status:
          type: boolean
          description: Request success status
          example: true
        message:
          type: string
          description: Response message
          example: Operation completed successfully
      required:
        - status
        - message
    PaginatedCollectionsResponseDto:
      type: object
      properties:
        data:
          description: List of collections
          type: array
          items:
            $ref: '#/components/schemas/BilaCollectionResponseDto'
        meta:
          description: Pagination metadata
          allOf:
            - $ref: '#/components/schemas/PaginationMetaDto'
      required:
        - data
        - meta
    BilaCollectionResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Collection ID
          example: col-001
        reference:
          type: string
          description: Client reference
          example: order-12345
        status:
          type: string
          description: Collection status
          enum:
            - pending
            - successful
            - failed
            - otp-required
            - pay-offline
          example: successful
        amount:
          type: number
          description: Collection amount
          example: 100
        currency:
          type: string
          description: Currency code
          example: ZMW
        feeBearer:
          type: string
          description: Who bears the collection platform fee
          enum:
            - merchant
            - customer
        narration:
          type: string
          description: Collection narration
          example: 'Payment for Order #12345'
        customer:
          description: Customer details
          allOf:
            - $ref: '#/components/schemas/BilaCollectionCustomerDto'
        createdAt:
          type: string
          description: Collection creation timestamp
          example: '2024-01-15T10:30:00Z'
          format: date-time
        completedAt:
          type: string
          description: Collection completion timestamp
          example: '2024-01-15T10:31:00Z'
          format: date-time
      required:
        - id
        - reference
        - status
        - amount
        - currency
        - customer
        - createdAt
    PaginationMetaDto:
      type: object
      properties:
        total:
          type: number
          description: Total number of records
          example: 150
        perPage:
          type: number
          description: Items per page
          example: 50
        currentPage:
          type: number
          description: Current page number
          example: 1
        pageCount:
          type: number
          description: Total number of pages
          example: 3
      required:
        - total
        - perPage
        - currentPage
        - pageCount
    BilaCollectionCustomerDto:
      type: object
      properties:
        phone:
          type: string
          description: Customer phone number
          example: '0977123456'
        name:
          type: string
          description: Customer name
          example: JOHN DOE
        operator:
          type: string
          description: Mobile money operator
          example: airtel
      required:
        - phone
        - name
        - operator
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: Merchant API key (e.g., sk_live_xxx or sk_test_xxx)

````