# Confirm Invoice Request Webhook

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/invoice/req-confirm-invoice:
    post:
      summary: Confirm Invoice Request Webhook
      deprecated: false
      description: ''
      tags:
        - Bharat Connect (BBPS)/APIs - BBPS/Vendor Payment/Webhook/Invoice
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceConfirmationRequest'
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationResponseConfirmInvoiceResponse'
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: Bharat Connect (BBPS)/APIs - BBPS/Vendor Payment/Webhook/Invoice
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-18788117-run
components:
  schemas:
    InvoiceConfirmationRequest:
      type: object
      properties:
        device:
          type: object
          properties:
            tag:
              type: object
              properties:
                name:
                  type: string
                  enum:
                    - GEOCODE
                    - IP
                    - AGENTID
                  x-apidog-enum:
                    - value: GEOCODE
                      name: ''
                      description: ''
                    - value: IP
                      name: ''
                      description: ''
                    - value: AGENTID
                      name: ''
                      description: ''
                value:
                  type: string
                  pattern: ^([^\\\"]){1,100}$
              required:
                - name
                - value
              x-apidog-orders:
                - name
                - value
              x-apidog-ignore-properties: []
          required:
            - tag
          x-apidog-orders:
            - tag
          x-apidog-ignore-properties: []
        b2bIds:
          type: object
          properties:
            buyerB2BId:
              type: string
              pattern: '^([^\\\"]){1,100}$ '
            supplierB2BId:
              type: string
              pattern: '^([^\\\"]){1,100}$ '
          required:
            - buyerB2BId
            - supplierB2BId
          x-apidog-orders:
            - buyerB2BId
            - supplierB2BId
          x-apidog-ignore-properties: []
        invoiceConfirmation:
          type: object
          properties:
            objectId:
              type: string
              pattern: ^[INV]{3}[A-Za-z0-9]{32,32}$
              description: |-
                Unique Identifier of the
                invoice across all entities,
                created by the originator.
                Format:
                INV<Timestamp><MachineID>
                <ThreadID><RandomNumber
                >
            supplierInvoiceNumber:
              type: string
              pattern: ^([^\\\"]){1,50}$
            objectVersion:
              type: object
              properties:
                currentVersion:
                  type: integer
                  minimum: 1
                  maximum: 100
                newVersion:
                  type: integer
                  minimum: 1
                  maximum: 100
              required:
                - currentVersion
                - newVersion
              x-apidog-orders:
                - currentVersion
                - newVersion
              x-apidog-ignore-properties: []
            buyerResponse:
              type: string
              enum:
                - ACCEPT
                - REJECT
                - RETURN
              x-apidog-enum:
                - value: ACCEPT
                  name: ' '
                  description: ''
                - value: REJECT
                  name: ''
                  description: ''
                - value: RETURN
                  name: ''
                  description: ''
            buyerRemarks:
              type: string
              pattern: ^([^\\\"]){1,100}$
            statusTransition:
              type: object
              properties:
                currentStatus:
                  type: string
                  enum:
                    - CREATED
                    - SENT TO BUYER
                    - ACCEPTED
                    - REJECTED
                    - UNDER REVIEW
                    - CANCELLED
                    - DELETED
                    - PARTIALLY PAID
                    - FULLY PAID
                    - CLOSED
                    - ABANDONED
                    - PAYMENT INITIATED
                    - PARTIALLY PAID AND PAYMENT INITIATED
                  x-apidog-enum:
                    - value: CREATED
                      name: ''
                      description: ''
                    - value: SENT TO BUYER
                      name: ''
                      description: ''
                    - value: ACCEPTED
                      name: ''
                      description: ''
                    - value: REJECTED
                      name: ''
                      description: ''
                    - value: UNDER REVIEW
                      name: ''
                      description: ''
                    - value: CANCELLED
                      name: ''
                      description: ''
                    - value: DELETED
                      name: ''
                      description: ''
                    - value: PARTIALLY PAID
                      name: ''
                      description: ''
                    - value: FULLY PAID
                      name: ''
                      description: ''
                    - value: CLOSED
                      name: ''
                      description: ''
                    - value: ABANDONED
                      name: ''
                      description: ''
                    - value: PAYMENT INITIATED
                      name: ''
                      description: ''
                    - value: PARTIALLY PAID AND PAYMENT INITIATED
                      name: ''
                      description: ''
                  description: |-
                    Current status of the invoice.
                    Rule - For this API it shoul be
                    "SENT TO BUYER", "UNDER
                    REVIEW"
                newStatus:
                  type: string
                  enum:
                    - CREATED
                    - SENT TO BUYER
                    - ACCEPTED
                    - REJECTED
                    - UNDER REVIEW
                    - CANCELLED
                    - DELETED
                    - PARTIALLY PAID
                    - FULLY PAID
                    - CLOSED
                    - ABANDONED
                    - PAYMENT INITIATED
                    - PARTIALLY PAID AND PAYMENT INITIATED
                  x-apidog-enum:
                    - value: CREATED
                      name: ''
                      description: ''
                    - value: SENT TO BUYER
                      name: ''
                      description: ''
                    - value: ACCEPTED
                      name: ''
                      description: ''
                    - value: REJECTED
                      name: ''
                      description: ''
                    - value: UNDER REVIEW
                      name: ''
                      description: ''
                    - value: CANCELLED
                      name: ''
                      description: ''
                    - value: DELETED
                      name: ''
                      description: ''
                    - value: PARTIALLY PAID
                      name: ''
                      description: ''
                    - value: FULLY PAID
                      name: ''
                      description: ''
                    - value: CLOSED
                      name: ''
                      description: ''
                    - value: ABANDONED
                      name: ''
                      description: ''
                    - value: PAYMENT INITIATED
                      name: ''
                      description: ''
                    - value: PARTIALLY PAID AND PAYMENT INITIATED
                      name: ''
                      description: ''
                  description: |-
                    new status if the transaction is
                    successful.
                    Rule - For this API it should be
                    For "Accept" response -
                    "Accepted",
                    For "Reject" response -
                    "Rejected",
                    For "Return" response -
                    "Under Review" 
              required:
                - currentStatus
                - newStatus
              x-apidog-orders:
                - currentStatus
                - newStatus
              x-apidog-ignore-properties: []
          required:
            - objectId
            - supplierInvoiceNumber
            - objectVersion
            - buyerResponse
            - buyerRemarks
            - statusTransition
          x-apidog-orders:
            - objectId
            - supplierInvoiceNumber
            - objectVersion
            - buyerResponse
            - buyerRemarks
            - statusTransition
          x-apidog-ignore-properties: []
      required:
        - device
        - b2bIds
        - invoiceConfirmation
      x-apidog-orders:
        - device
        - b2bIds
        - invoiceConfirmation
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApplicationResponseConfirmInvoiceResponse:
      type: object
      properties:
        response_message:
          type: string
        response_code:
          type: integer
        payload:
          $ref: '#/components/schemas/ConfirmInvoiceResponse'
      x-apidog-orders:
        - response_message
        - response_code
        - payload
      required:
        - response_message
        - response_code
        - payload
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ConfirmInvoiceResponse:
      required:
        - resp
        - b2bIds
        - invoiceConfirmation
      type: object
      properties:
        resp:
          $ref: '#/components/schemas/Resp'
        b2bIds:
          $ref: '#/components/schemas/NbblB2BIdsModel'
        invoiceConfirmation:
          $ref: '#/components/schemas/InvoiceConfirmation'
        additionalInfos:
          type: array
          items:
            $ref: '#/components/schemas/AdditionalInfo'
      x-apidog-orders:
        - resp
        - b2bIds
        - invoiceConfirmation
        - additionalInfos
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    AdditionalInfo:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
      x-apidog-orders:
        - name
        - value
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    InvoiceConfirmation:
      required:
        - objectId
        - supplierInvoiceNumber
        - objectVersion
        - buyerResponse
        - buyerRemarks
        - statusTransition
      type: object
      properties:
        objectId:
          type: string
        supplierInvoiceNumber:
          type: string
        objectVersion:
          $ref: '#/components/schemas/ObjectVersion'
        buyerResponse:
          type: string
        buyerRemarks:
          type: string
        statusTransition:
          $ref: '#/components/schemas/StatusTransition'
      x-apidog-orders:
        - objectId
        - supplierInvoiceNumber
        - objectVersion
        - buyerResponse
        - buyerRemarks
        - statusTransition
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    StatusTransition:
      required:
        - currentStatus
        - newStatus
      type: object
      properties:
        currentStatus:
          type: string
          enum:
            - CREATED
            - SENT TO BUYER
            - ACCEPTED
            - REJECTED
            - UNDER REVIEW
            - CANCELLED
            - DELETED
            - PARTIALLY PAID
            - FULLY PAID
            - CLOSED
            - ABANDONED
            - PAYMENT INITIATED
            - PARTIALLY PAID AND PAYMENT INITIATED
          x-apidog-enum:
            - value: CREATED
              name: ''
              description: ''
            - value: SENT TO BUYER
              name: ''
              description: ''
            - value: ACCEPTED
              name: ''
              description: ''
            - value: REJECTED
              name: ''
              description: ''
            - value: UNDER REVIEW
              name: ''
              description: ''
            - value: CANCELLED
              name: ''
              description: ''
            - value: DELETED
              name: ''
              description: ''
            - value: PARTIALLY PAID
              name: ''
              description: ''
            - value: FULLY PAID
              name: ''
              description: ''
            - value: CLOSED
              name: ''
              description: ''
            - value: ABANDONED
              name: ''
              description: ''
            - value: PAYMENT INITIATED
              name: ''
              description: ''
            - value: PARTIALLY PAID AND PAYMENT INITIATED
              name: ''
              description: ''
        newStatus:
          type: string
          enum:
            - CREATED
            - SENT TO BUYER
            - ACCEPTED
            - REJECTED
            - UNDER REVIEW
            - CANCELLED
            - DELETED
            - PARTIALLY PAID
            - FULLY PAID
            - CLOSED
            - ABANDONED
            - PAYMENT INITIATED
            - PARTIALLY PAID AND PAYMENT INITIATED
          x-apidog-enum:
            - value: CREATED
              name: ''
              description: ''
            - value: SENT TO BUYER
              name: ''
              description: ''
            - value: ACCEPTED
              name: ''
              description: ''
            - value: REJECTED
              name: ''
              description: ''
            - value: UNDER REVIEW
              name: ''
              description: ''
            - value: CANCELLED
              name: ''
              description: ''
            - value: DELETED
              name: ''
              description: ''
            - value: PARTIALLY PAID
              name: ''
              description: ''
            - value: FULLY PAID
              name: ''
              description: ''
            - value: CLOSED
              name: ''
              description: ''
            - value: ABANDONED
              name: ''
              description: ''
            - value: PAYMENT INITIATED
              name: ''
              description: ''
            - value: PARTIALLY PAID AND PAYMENT INITIATED
              name: ''
              description: ''
      x-apidog-orders:
        - currentStatus
        - newStatus
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ObjectVersion:
      required:
        - currentVersion
        - newVersion
      type: object
      properties:
        currentVersion:
          type: integer
          format: int32
          minimum: 1
          maximum: 100
          default: 1
        newVersion:
          type: integer
          format: int32
          minimum: 1
          maximum: 100
          default: 1
      x-apidog-orders:
        - currentVersion
        - newVersion
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    NbblB2BIdsModel:
      required:
        - buyerB2BId
        - supplierB2BId
      type: object
      properties:
        buyerB2BId:
          type: string
          pattern: '^([^\\\"]){1,100}$ '
        supplierB2BId:
          type: string
          pattern: '^([^\\\"]){1,100}$ '
      x-apidog-orders:
        - buyerB2BId
        - supplierB2BId
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Resp:
      required:
        - reqMsgId
        - result
      type: object
      properties:
        reqMsgId:
          type: string
        result:
          type: string
        errorCd:
          type: string
        errorDtl:
          type: string
        errorField:
          type: string
      x-apidog-orders:
        - reqMsgId
        - result
        - errorCd
        - errorDtl
        - errorField
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
