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

# Get bill transaction by reference

> Retrieve a specific bill transaction using its unique reference. User can only access their own transactions.



## OpenAPI

````yaml /openapi.json get /api/v1/bills/records/reference/{reference}
openapi: 3.0.0
info:
  title: Mr Monei API Gateway
  description: External API for partners using API Key authentication
  version: '1.0'
  contact: {}
servers:
  - url: https://api.dev.monei.cc
    description: Dev Server
  - url: https://api.monei.cc
    description: Live Server
security: []
tags: []
paths:
  /api/v1/bills/records/reference/{reference}:
    get:
      tags:
        - Bill | Records
      summary: Get bill transaction by reference
      description: >-
        Retrieve a specific bill transaction using its unique reference. User
        can only access their own transactions.
      operationId: BillHistoryController_getBillByReference
      parameters:
        - name: reference
          required: true
          in: path
          description: Unique bill transaction reference
          schema:
            example: BILL-REF-20240115-ABCD1234
            type: string
      responses:
        '200':
          description: Successfully retrieved bill transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillResponseDto'
        '400':
          description: Bad request - invalid reference format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillNotFoundResponseDto'
        '401':
          description: Unauthorized - authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillNotFoundResponseDto'
        '404':
          description: Bill transaction not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillNotFoundResponseDto'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillNotFoundResponseDto'
      security:
        - bearer: []
        - api-key: []
components:
  schemas:
    BillResponseDto:
      type: object
      properties:
        statusCode:
          type: number
        message:
          type: string
        data:
          description: Bill payment fetched successfully
          allOf:
            - $ref: '#/components/schemas/BillDto'
        errors:
          type: object
      required:
        - statusCode
        - message
        - data
        - errors
    BillNotFoundResponseDto:
      type: object
      properties:
        success:
          type: boolean
          description: Success status
          example: false
        message:
          type: string
          description: Error message
          example: Bill transaction not found
        errorCode:
          type: string
          description: Error code
          example: BILL_NOT_FOUND
        reference:
          type: string
          description: Requested reference
          example: BILL-REF-12345
      required:
        - success
        - message
        - errorCode
        - reference
    BillDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier
        createdAt:
          format: date-time
          type: string
          description: Record creation timestamp
        updatedAt:
          format: date-time
          type: string
          description: Record last updated timestamp
        deletedDate:
          format: date-time
          type: string
          description: Record deletion timestamp
        userId:
          type: string
        reference:
          type: string
        billerCode:
          type: string
        itemCode:
          type: string
        customer:
          type: string
        amount:
          type: number
        type:
          type: string
          enum:
            - AIRTIME
            - MOBILEDATA
            - CABLEBILLS
            - UTILITYBILLS
        status:
          type: string
          enum:
            - PENDING
            - SUCCESS
            - FAILED
        txRef:
          type: string
        billerName:
          type: string
        validityPeriod:
          type: string
        metadata:
          type: string
        token:
          type: string
        units:
          type: string
        providerData:
          type: string
      required:
        - id
        - createdAt
        - updatedAt
        - deletedDate
        - userId
        - reference
        - billerCode
        - itemCode
        - customer
        - amount
        - type
        - status
        - providerData
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-KEY

````