> ## 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.

# Get collection by reference

> Retrieve collection status by client reference



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/bila/collections/status/{reference}
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/status/{reference}:
    get:
      tags:
        - Collections
      summary: Get collection by reference
      description: Retrieve collection status by client reference
      operationId: BilaCollectionsController_getCollectionByReference
      parameters:
        - name: reference
          required: true
          in: path
          description: Client reference
          schema:
            example: collection-001
            type: string
      responses:
        '200':
          description: Collection retrieved successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BilaResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/BilaCollectionResponseDto'
        '404':
          description: Collection not found
      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
    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
    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)

````