# Pay Invoice

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/payment/req-pay:
    post:
      summary: Pay Invoice
      deprecated: false
      description: >-

        :::highlight purple 📌

        Use this API to initiate payment for one or more invoices directly from
        your EnKash account via NPCI (National Payments Corporation of India)
        rails.


        This allows you to settle outstanding invoices seamlessly through the
        platform, streamlining your accounts payable process and ensuring timely
        payments to your vendors or service providers.

        The settlement of the invoice amount to the supplier is processed via
        NPCI, ensuring secure and efficient fund transfers.

        :::
      tags:
        - Bharat Connect (BBPS)/APIs - BBPS/Vendor Payment/Payment
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentRequest'
            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-apidog-ignore-properties: []
              example:
                payload: SUCCESS
                response_code: 0
                response_message: SUCCESS
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: Bharat Connect (BBPS)/APIs - BBPS/Vendor Payment/Payment
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-10664767-run
components:
  schemas:
    PaymentRequest:
      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: []
        payment:
          type: object
          properties:
            objectId:
              type: string
              pattern: ^[PMT]{3}[A-Za-z0-9]{32,32}$
            ts:
              type: string
            type:
              type: string
              enum:
                - ONPLATFORM
                - OFFPLATFORM
              x-apidog-enum:
                - value: ONPLATFORM
                  name: ''
                  description: ''
                - value: OFFPLATFORM
                  name: ''
                  description: ''
            mode:
              type: string
              enum:
                - INTERNET BANKING
                - DEBIT CARD
                - CREDIT CARD
                - IMPS
                - CASH
                - UPI
                - WALLET
                - NEFT
                - PREPAID CARD
                - ACCOUNT TRANSFER
                - CHEQUE
              x-apidog-enum:
                - value: INTERNET BANKING
                  name: ' '
                  description: ''
                - value: DEBIT CARD
                  name: ' '
                  description: ''
                - value: CREDIT CARD
                  name: ' '
                  description: ''
                - value: IMPS
                  name: ''
                  description: ''
                - value: CASH
                  name: ' '
                  description: ''
                - value: UPI
                  name: ' '
                  description: ''
                - value: WALLET
                  name: ' '
                  description: ''
                - value: NEFT
                  name: ''
                  description: ''
                - value: PREPAID CARD
                  name: ' '
                  description: ''
                - value: ACCOUNT TRANSFER
                  name: ' '
                  description: ''
                - value: CHEQUE
                  name: ''
                  description: ''
            utr:
              type: string
              pattern: ^([^\\\"]){1,50}$
            currency:
              type: string
              enum:
                - INR
              x-apidog-enum:
                - value: INR
                  name: ''
                  description: ''
            paymentAmount:
              type: object
              properties:
                netPaidAmount:
                  type: integer
                netAdjustmentAmount:
                  type: integer
                totalAmount:
                  type: integer
                currency:
                  type: string
                  enum:
                    - INR
                  x-apidog-enum:
                    - value: INR
                      name: ''
                      description: ''
              required:
                - netPaidAmount
                - netAdjustmentAmount
                - totalAmount
                - currency
              x-apidog-orders:
                - netPaidAmount
                - netAdjustmentAmount
                - totalAmount
                - currency
              x-apidog-ignore-properties: []
            invoicesPayInfos:
              type: array
              items:
                type: object
                properties:
                  objectId:
                    type: string
                    pattern: ^[INV]{3}[A-Za-z0-9]{32,32}$
                  supplierInvoiceNumber:
                    type: string
                    pattern: ^([^\\\"]){1,50}$
                  objectVersion:
                    type: object
                    properties:
                      currentVersion:
                        type: integer
                        minimum: 1
                        maximum: 100
                        default: 1
                      newVersion:
                        type: integer
                        default: 1
                        minimum: 1
                        maximum: 100
                    required:
                      - currentVersion
                      - newVersion
                    x-apidog-orders:
                      - currentVersion
                      - newVersion
                    x-apidog-ignore-properties: []
                  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: ''
                      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: ''
                    required:
                      - currentStatus
                      - newStatus
                    x-apidog-orders:
                      - currentStatus
                      - newStatus
                    x-apidog-ignore-properties: []
                  invoiceAmount:
                    type: object
                    properties:
                      dueAmount:
                        type: integer
                      totalAmount:
                        type: integer
                      currency:
                        type: string
                        enum:
                          - INR
                        x-apidog-enum:
                          - value: INR
                            name: ''
                            description: ''
                    required:
                      - dueAmount
                      - totalAmount
                      - currency
                    x-apidog-orders:
                      - dueAmount
                      - totalAmount
                      - currency
                    x-apidog-ignore-properties: []
                  invoicePaymentAmount:
                    type: object
                    properties:
                      netPaidAmount:
                        type: integer
                      netAdjustmentAmount:
                        type: integer
                      totalAmount:
                        type: integer
                      currency:
                        type: string
                        enum:
                          - INR
                        x-apidog-enum:
                          - value: INR
                            name: ''
                            description: ''
                      splits:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            value:
                              type: integer
                            refNo:
                              type: string
                          x-apidog-orders:
                            - name
                            - value
                            - refNo
                          x-apidog-ignore-properties: []
                    required:
                      - netPaidAmount
                      - netAdjustmentAmount
                      - totalAmount
                      - currency
                    x-apidog-orders:
                      - netPaidAmount
                      - netAdjustmentAmount
                      - totalAmount
                      - currency
                      - splits
                    x-apidog-ignore-properties: []
                  supplierBankAccountDetails:
                    type: object
                    properties:
                      maskedAccountNumber:
                        type: string
                        pattern: ^[a-zA-Z0-9]{4}$
                      ifsc:
                        type: string
                        pattern: '^[a-zA-Z0-9]{11,11}$ '
                      beneficiaryName:
                        type: string
                        pattern: '^([^\\\"]){1,256}$ '
                      businessVPA:
                        type: string
                        pattern: '^([^\\\"]){1,256}$ '
                    required:
                      - maskedAccountNumber
                      - ifsc
                      - beneficiaryName
                      - businessVPA
                    x-apidog-orders:
                      - maskedAccountNumber
                      - ifsc
                      - beneficiaryName
                      - businessVPA
                    x-apidog-ignore-properties: []
                x-apidog-orders:
                  - objectId
                  - supplierInvoiceNumber
                  - objectVersion
                  - statusTransition
                  - invoiceAmount
                  - invoicePaymentAmount
                  - supplierBankAccountDetails
                required:
                  - objectId
                  - supplierInvoiceNumber
                  - objectVersion
                  - statusTransition
                  - invoiceAmount
                  - invoicePaymentAmount
                  - supplierBankAccountDetails
                x-apidog-ignore-properties: []
          required:
            - objectId
            - ts
            - type
            - mode
            - utr
            - currency
            - paymentAmount
            - invoicesPayInfos
          x-apidog-orders:
            - objectId
            - ts
            - type
            - mode
            - utr
            - currency
            - paymentAmount
            - invoicesPayInfos
          x-apidog-ignore-properties: []
        additionalInfos:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              value:
                type: string
            x-apidog-orders:
              - name
              - value
            x-apidog-ignore-properties: []
      required:
        - device
        - b2bIds
        - payment
      x-apidog-orders:
        - device
        - b2bIds
        - payment
        - additionalInfos
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
