# Setup Webhook Endpoint

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /merchant_url:
    post:
      summary: Setup Webhook Endpoint
      deprecated: false
      description: >

        :::highlight purple 📌

        Use these API details to setup a webhook endpoint on your side that can
        receive event notifications from EnKash.

        The webhook supports:

        - Static headers for security validation, ensuring that incoming
        requests can be authenticated.

        - A custom payload, allowing flexibility in the event data delivered to
        your system.

        :::
      tags:
        - Bharat Connect (BBPS)/APIs - BBPS/Bill Payment/Webhook
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UtilityWebhookV2Request'
            example:
              utilityEnkashId: UTIL-87654321
              amount: 2450.75
              consumerNumber: CN123456789
              consumerName: Tech Solutions Ltd
              billDate: '2025-05-10'
              billDueDate: '2025-06-05'
              createdDate: '2025-05-12T14:30:25'
              billNumber: BILL-123456
              billerBillNumber: BILLER-654321
              numberOfUnits: 215
              approvalStatus: APPROVED
              approvalRemarks: Verified and approved by finance department
              paymentStatus: COMPLETED
              billpayStatus: COMPLETED
              failureReason: null
              failureCode: null
              paymentDate: '2025-05-20T10:15:30'
              billpayDate: '2025-05-20T10:20:45'
              approvedDate: '2025-05-15T09:45:20'
              billReferenceId: REF-987654321
              billStartDate: '2025-04-10'
              billEndDate: '2025-05-09'
              remarks: Corporate office electricity bill payment
              refundDate: null
              companyBiller:
                companyBillerId: CB-54321
                companyName: Tech Solutions Ltd
                biller:
                  billerId: 2001
                  name: Metropolitan Power Corporation
                  billerType: ELECTRICITY
                circleEnum: MUMBAI
                billInputParams: consumer_number=CN123456789
                billerParams:
                  - key: cn
                    name: Consumer Number
                    value: CN123456789
                  - key: ad1
                    name: Billing Unit
                    value: MUMBAI-WEST
                consumerNumber: CN123456789
                consumerName: Tech Solutions Ltd
              billAmount: 2450.75
              earlyPaymentDate: '2025-05-25'
              earlyPaymentAmount: 2400
              latePaymentAmount: 2525.5
              actualDueDate: '2025-06-05'
              companyId: COMP-123456
              bankTransactionId: TXN-987654321
              referenceId: REF-XYZABC123456
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
                x-apidog-refs: {}
                x-apidog-orders: []
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: Bharat Connect (BBPS)/APIs - BBPS/Bill Payment/Webhook
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-12515630-run
components:
  schemas:
    UtilityWebhookV2Request:
      type: object
      properties:
        utilityEnkashId:
          type: string
        amount:
          type: number
        consumerNumber:
          type: string
        consumerName:
          type: string
        billDate:
          type: string
        billDueDate:
          type: string
        createdDate:
          type: string
        billNumber:
          type: string
        billerBillNumber:
          type: string
        numberOfUnits:
          type: integer
        approvalStatus:
          type: string
        approvalRemarks:
          type: string
        paymentStatus:
          type: string
        billpayStatus:
          type: string
        failureReason:
          type: 'null'
        failureCode:
          type: 'null'
        paymentDate:
          type: string
        billpayDate:
          type: string
        approvedDate:
          type: string
        billReferenceId:
          type: string
        billStartDate:
          type: string
        billEndDate:
          type: string
        remarks:
          type: string
        refundDate:
          type: 'null'
        companyBiller:
          type: object
          properties:
            companyBillerId:
              type: string
            companyName:
              type: string
            biller:
              type: object
              properties:
                billerId:
                  type: integer
                name:
                  type: string
                billerType:
                  type: string
              required:
                - billerId
                - name
                - billerType
              x-apidog-orders:
                - billerId
                - name
                - billerType
              x-apidog-ignore-properties: []
            circleEnum:
              type: string
            billInputParams:
              type: string
            billerParams:
              type: array
              items:
                type: object
                properties:
                  key:
                    type: string
                  name:
                    type: string
                  value:
                    type: string
                required:
                  - key
                  - name
                  - value
                x-apidog-orders:
                  - key
                  - name
                  - value
                x-apidog-ignore-properties: []
            consumerNumber:
              type: string
            consumerName:
              type: string
          required:
            - companyBillerId
            - companyName
            - biller
            - circleEnum
            - billInputParams
            - billerParams
            - consumerNumber
            - consumerName
          x-apidog-orders:
            - companyBillerId
            - companyName
            - biller
            - circleEnum
            - billInputParams
            - billerParams
            - consumerNumber
            - consumerName
          x-apidog-ignore-properties: []
        billAmount:
          type: number
        earlyPaymentDate:
          type: string
        earlyPaymentAmount:
          type: integer
        latePaymentAmount:
          type: number
        actualDueDate:
          type: string
        companyId:
          type: string
        bankTransactionId:
          type: string
        referenceId:
          type: string
      required:
        - utilityEnkashId
        - amount
        - consumerNumber
        - consumerName
        - billDate
        - billDueDate
        - createdDate
        - billNumber
        - billerBillNumber
        - numberOfUnits
        - approvalStatus
        - approvalRemarks
        - paymentStatus
        - billpayStatus
        - failureReason
        - failureCode
        - paymentDate
        - billpayDate
        - approvedDate
        - billReferenceId
        - billStartDate
        - billEndDate
        - remarks
        - refundDate
        - companyBiller
        - billAmount
        - earlyPaymentDate
        - earlyPaymentAmount
        - latePaymentAmount
        - actualDueDate
        - companyId
        - bankTransactionId
        - referenceId
      x-apidog-orders:
        - utilityEnkashId
        - amount
        - consumerNumber
        - consumerName
        - billDate
        - billDueDate
        - createdDate
        - billNumber
        - billerBillNumber
        - numberOfUnits
        - approvalStatus
        - approvalRemarks
        - paymentStatus
        - billpayStatus
        - failureReason
        - failureCode
        - paymentDate
        - billpayDate
        - approvedDate
        - billReferenceId
        - billStartDate
        - billEndDate
        - remarks
        - refundDate
        - companyBiller
        - billAmount
        - earlyPaymentDate
        - earlyPaymentAmount
        - latePaymentAmount
        - actualDueDate
        - companyId
        - bankTransactionId
        - referenceId
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
