# Confirm Invoice

## 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
      deprecated: false
      description: >-

        :::highlight purple 📌

        Use this API to confirm an existing invoice sent via Bharat Connect to
        your EnKash account.

        Confirming an invoice typically marks it as approved on the Bharat
        Connect ecosystem, making it ready for payment collection. 

        :::
      tags:
        - Bharat Connect (BBPS)/APIs - BBPS/Vendor Payment/Invoice
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceConfirmationRequest'
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  payload:
                    type: string
                  response_code:
                    type: integer
                  response_message:
                    type: string
                required:
                  - payload
                  - response_code
                  - response_message
                x-apidog-orders:
                  - payload
                  - response_code
                  - response_message
                x--orders:
                  - payload
                  - response_code
                  - response_message
                x--ignore-properties: []
              example:
                response_code: 0
                response_message: SUCCESS
                payload: string
          headers: {}
          x-apidog-name: SUCCESS
      security: []
      x-apidog-folder: Bharat Connect (BBPS)/APIs - BBPS/Vendor Payment/Invoice
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-10664764-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--orders:
                - name
                - value
              x--ignore-properties: []
          required:
            - tag
          x-apidog-orders:
            - tag
          x--orders:
            - tag
          x--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--orders:
            - buyerB2BId
            - supplierB2BId
          x--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--orders:
                - currentVersion
                - newVersion
              x--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--orders:
                - currentStatus
                - newStatus
              x--ignore-properties: []
          required:
            - objectId
            - supplierInvoiceNumber
            - objectVersion
            - buyerResponse
            - buyerRemarks
            - statusTransition
          x-apidog-orders:
            - objectId
            - supplierInvoiceNumber
            - objectVersion
            - buyerResponse
            - buyerRemarks
            - statusTransition
          x--orders:
            - objectId
            - supplierInvoiceNumber
            - objectVersion
            - buyerResponse
            - buyerRemarks
            - statusTransition
          x--ignore-properties: []
      required:
        - device
        - b2bIds
        - invoiceConfirmation
      x-apidog-orders:
        - device
        - b2bIds
        - invoiceConfirmation
      x--orders:
        - device
        - b2bIds
        - invoiceConfirmation
      x--ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
