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

# Transaction History

> Fetch all bill payments with pagination and status filters.



## OpenAPI

````yaml /openapi.json get /api/v1/bills/records
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:
    get:
      tags:
        - Bill | Records
      summary: Transaction History
      description: Fetch all bill payments with pagination and status filters.
      operationId: BillHistoryController_getHistory
      parameters:
        - name: type
          required: false
          in: query
          description: Filter by transaction type
          schema:
            example: AIRTIME
            enum:
              - AIRTIME
              - MOBILEDATA
              - CABLEBILLS
              - UTILITYBILLS
            type: string
        - name: status
          required: false
          in: query
          description: Filter by transaction status
          schema:
            example: SUCCESS
            enum:
              - PENDING
              - SUCCESS
              - FAILED
            type: string
        - name: billerName
          required: false
          in: query
          description: Filter by biller name (partial match)
          schema:
            example: MTN
            type: string
        - name: billerCode
          required: false
          in: query
          description: Filter by biller code
          schema:
            example: BIL099
            type: string
        - name: customer
          required: false
          in: query
          description: Filter by customer reference/phone number
          schema:
            example: '08012345678'
            type: string
        - name: startDate
          required: false
          in: query
          description: Start date for filtering (YYYY-MM-DD)
          schema:
            example: '2024-01-01'
            type: string
        - name: endDate
          required: false
          in: query
          description: End date for filtering (YYYY-MM-DD)
          schema:
            example: '2024-12-31'
            type: string
        - name: search
          required: false
          in: query
          description: Search in reference or txRef fields
          schema:
            example: REF12345
            type: string
        - name: minAmount
          required: false
          in: query
          description: Minimum amount filter
          schema:
            type: number
            example: 100
        - name: maxAmount
          required: false
          in: query
          description: Maximum amount filter
          schema:
            example: 1000
            type: number
        - name: page
          required: false
          in: query
          description: Page number (starting from 1)
          schema:
            default: 1
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            default: 10
            example: 10
            type: number
        - name: sortBy
          required: false
          in: query
          description: Sort field
          schema:
            default: createdAt
            example: createdAt
            type: string
        - name: sortOrder
          required: false
          in: query
          description: Sort order
          schema:
            default: DESC
            example: DESC
            enum:
              - ASC
              - DESC
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillHistoryResponseDto'
      security:
        - bearer: []
        - api-key: []
components:
  schemas:
    BillHistoryResponseDto:
      type: object
      properties:
        statusCode:
          type: number
        message:
          type: string
        data:
          description: Bill payment transaction history
          allOf:
            - $ref: '#/components/schemas/BillHistoryDto'
        errors:
          type: object
      required:
        - statusCode
        - message
        - data
        - errors
    BillHistoryDto:
      type: object
      properties:
        bills:
          description: List of bill transactions
          type: array
          items:
            $ref: '#/components/schemas/BillDto'
        page:
          type: number
          description: Current page number
          example: 1
        limit:
          type: number
          description: Number of items per page
          example: 10
        total:
          type: number
          description: Total number of items
          example: 100
        totalPages:
          type: number
          description: Total number of pages
          example: 10
        hasNext:
          type: boolean
          description: Whether there is a next page
          example: true
        hasPrev:
          type: boolean
          description: Whether there is a previous page
          example: false
      required:
        - bills
        - page
        - limit
        - total
        - totalPages
        - hasNext
        - hasPrev
    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

````