# Fetch Current Bill

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v2/biller/fetchOrAddBill:
    post:
      summary: Fetch Current Bill
      deprecated: false
      description: >-

        :::highlight purple 📌

        Use this API to submit biller details and retrieve the current bill
        information provided by Bharat Connect System (BBPS).

        This allows you to obtain up-to-date billing data for a customer,
        enabling accurate payment processing and streamlined bill management.

        :::
      operationId: fetchBill
      tags:
        - Bharat Connect (BBPS)/APIs - BBPS/Bill Payment/Fetch Bill
        - Company Biller Apis
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BillFetchRequest'
            example:
              billerId: 4
              circle: AP
              billParams:
                cn: '1234567890'
                ad1: '6536'
              remarks: Create
              keyContactEmail: shreshth.test@enkash.com
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationResponseBillFetchResponse'
              examples:
                '1':
                  summary: Success With Bill Details
                  value:
                    response_code: 0
                    response_message: Success
                    payload:
                      companyBillerId: CB579708053FS
                      billNumber: '559515'
                      userName: Shreshth Khandelwal
                      billAmount: 110
                      dueDate: '2025-09-09'
                      billPeriod: '1.03'
                      billnetamount: 120
                      earlyPaymentAmount: 100
                      latePaymentAmount: 120
                      actualDueDate: '2025-09-09'
                      statusMessage: ''
                      billParams:
                        cn: '453432254354'
                      additionalInfo:
                        Early Payment Date: '2025-09-07'
                        PC: '1'
                        Disconn Tag: '0'
                        Bill Month: '2501'
                        DTC Code: '4688962'
                '2':
                  summary: Success With No Bill Due
                  value:
                    response_code: 0
                    response_message: Success
                    payload:
                      companyBillerId: CB3075070FYEG
                      acceptPayment: false
                      acceptPartPay: false
                      statusMessage: Payment received for the billing period - no bill due
                      newCompanyBiller: false
                      billParams:
                        cn: '543343443'
                        ad1: '2323'
          headers: {}
          x-apidog-name: OK
        '412':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
                x-apidog-ignore-properties: []
              examples:
                '5':
                  summary: Invalid Consumer No
                  value:
                    response_code: 1
                    response_message: Please enter valid 12 Digit Consumer No
                    payload: Please enter valid 12 Digit Consumer No
                '6':
                  summary: Biller not found
                  value:
                    response_code: 1
                    response_message: no Biller found
                    payload: no Biller found
                '7':
                  summary: Invalid Biller Id
                  value:
                    response_code: 1
                    response_message: billerId is required
                    payload: billerId is required
          headers: {}
          x-apidog-name: ''
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  response_code:
                    type: integer
                  response_message:
                    type: string
                  payload:
                    type: string
                required:
                  - response_code
                  - response_message
                  - payload
                x-apidog-orders:
                  - response_code
                  - response_message
                  - payload
                x-apidog-ignore-properties: []
              examples:
                '3':
                  summary: Invalid customer params
                  value:
                    response_code: 1
                    response_message: Invalid combination of Customer parameters
                    payload: Invalid combination of Customer parameters
                '4':
                  summary: Unable to get bill details
                  value:
                    response_code: 1
                    response_message: Unable to get bill details from Biller
                    payload: Unable to get bill details from Biller
          headers: {}
          x-apidog-name: ''
      security:
        - bearer: []
      x-apidog-folder: Bharat Connect (BBPS)/APIs - BBPS/Bill Payment/Fetch Bill
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-10664798-run
components:
  schemas:
    BillFetchRequest:
      required:
        - billerId
        - billParams
      type: object
      properties:
        billerId:
          type: integer
          format: int32
          description: 'Biller Id provided by the us/ Received in Get Billers API '
        circle:
          type: string
          enum:
            - AP
            - ASM
            - BIH
            - CHE
            - DEL
            - GUJ
            - HAR
            - HP
            - JK
            - KK
            - KER
            - KOL
            - MAH
            - MP
            - MUM
            - NE
            - ORI
            - PUN
            - RAJ
            - TN
            - UPE
            - UPW
            - WB
            - ALL
            - AGRA
            - AHM
            - BHIWANDI
            - SURAT
            - SHILMUMBRAKALWA
          description: To be provided for biller specific to circle
        billParams:
          type: object
          additionalProperties:
            type: string
          x-apidog-orders:
            - cn
            - ad1
            - ad2
          properties:
            cn:
              type: string
              description: ConsumerNumber/Account Number
            ad1:
              type: string
              description: Additional Parameter 1
            ad2:
              type: string
              description: Additional Parameter 2
          required:
            - cn
          description: Biller input params for bill fetch
          x-apidog-ignore-properties: []
        remarks:
          type: string
          description: Optional remarks for the biller
        keyContactEmail:
          type: string
          description: emailIds for sending email after successful bill payment
        name:
          type: string
          description: Customer name, mandatory for Credit Card
        email:
          type: string
          description: Customer email, mandatory for Credit Card
      x-apidog-orders:
        - billerId
        - circle
        - billParams
        - remarks
        - keyContactEmail
        - name
        - email
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApplicationResponseBillFetchResponse:
      type: object
      properties:
        response_code:
          type: string
        response_message:
          type: string
        payload:
          $ref: '#/components/schemas/BillFetchV2Response'
      x-apidog-orders:
        - response_code
        - response_message
        - payload
      required:
        - response_code
        - response_message
        - payload
      x-apidog-refs: {}
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    BillFetchV2Response:
      type: object
      properties:
        companyBillerId:
          type: string
        billNumber:
          type: string
        billAmount:
          type: integer
        billdate:
          type: string
        dueDate:
          type: string
        billPeriod:
          type: string
        billnetamount:
          type: integer
        maxBillAmount:
          type: integer
        minBillAmount:
          type: integer
        earlyPaymentAmount:
          type: integer
        earlyPaymentDate:
          type: string
        latePaymentAmount:
          type: integer
        actualDueDate:
          type: string
        statusMessage:
          type: string
        billId:
          type: string
        billStartDate:
          type: string
        billEnddate:
          type: string
        utilityEnkashId:
          type: string
        referenceId:
          type: string
        billParams:
          type: object
          properties:
            cn:
              type: string
            ad1:
              type: string
            ad2:
              type: string
            ad3:
              type: string
          required:
            - cn
          x-apidog-orders:
            - cn
            - ad1
            - ad2
            - ad3
          x-apidog-ignore-properties: []
      required:
        - companyBillerId
        - billNumber
        - billAmount
        - billdate
        - dueDate
        - billPeriod
        - billnetamount
        - maxBillAmount
        - minBillAmount
        - earlyPaymentAmount
        - earlyPaymentDate
        - latePaymentAmount
        - actualDueDate
        - statusMessage
        - billId
        - billStartDate
        - billEnddate
        - utilityEnkashId
        - referenceId
        - billParams
      x-apidog-orders:
        - companyBillerId
        - billNumber
        - billAmount
        - billdate
        - dueDate
        - billPeriod
        - billnetamount
        - maxBillAmount
        - minBillAmount
        - earlyPaymentAmount
        - earlyPaymentDate
        - latePaymentAmount
        - actualDueDate
        - statusMessage
        - billId
        - billStartDate
        - billEnddate
        - utilityEnkashId
        - referenceId
        - billParams
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
