# Get IntentLink/QrCode with Split details

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/order/{orderId}/upi:
    post:
      summary: Get IntentLink/QrCode with Split details
      deprecated: false
      description: >-
        Initialises a UPI payment session for a given order. Returns both the
        UPI intent deep-links (GPay, PhonePe, Paytm, generic UPI) and a dynamic
        QR code in a single call. Optionally accepts split-settlement details
        that will be stored and automatically applied when the payment is
        captured via notify/enquiry.
      tags:
        - Payment Gateway/APIs - Payment Gateway /Split Settlement
      parameters:
        - name: orderId
          in: path
          description: The enkash order ID for which the UPI session is being created.
          required: true
          example: ''
          schema:
            type: string
        - name: Authorization
          in: header
          description: ''
          required: true
          example: Bearer <token>
          schema:
            type: string
        - name: merchantAccessKey
          in: header
          description: ''
          required: true
          example: <key>
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                splitSettlement:
                  type: object
                  properties:
                    amountSplitType:
                      type: string
                      description: >-
                        FLAT — absolute amounts in INR; PERCENTAGE — percentage
                        of total
                      enum:
                        - FLAT
                        - PERCENTAGE
                      x-apidog-enum:
                        - value: FLAT
                          name: ''
                          description: ''
                        - value: PERCENTAGE
                          name: ''
                          description: ''
                    splitSettlementDetails:
                      type: array
                      items:
                        type: object
                        properties:
                          splitAccountId:
                            type: string
                            description: >
                              Pre-registered split account ID. Either this or
                              label is required
                          value:
                            type: integer
                            description: >
                              Amount (for FLAT) or percentage (for PERCENTAGE).
                              Min 0.01
                          label:
                            type: string
                            description: >
                              Label of the split account. Either this or
                              splitAccountId is required
                        required:
                          - value
                        x-apidog-orders:
                          - splitAccountId
                          - label
                          - value
                      description: |
                        At least one entry required
                  required:
                    - amountSplitType
                    - splitSettlementDetails
                  x-apidog-orders:
                    - amountSplitType
                    - splitSettlementDetails
                  description: Omit entirely if no split is needed.
              x-apidog-orders:
                - splitSettlement
            examples:
              '1':
                value:
                  splitSettlement:
                    amountSplitType: FLAT
                    splitSettlementDetails:
                      - splitAccountId: SA001
                        value: 300
                      - splitAccountId: SA002
                        value: 200
                summary: Using Split Account Id
              '2':
                value:
                  splitSettlement:
                    amountSplitType: PERCENTAGE
                    splitSettlementDetails:
                      - label: partner_a
                        value: 60
                      - label: partner_b
                        value: 40
                summary: Using Label
              '3':
                value:
                  splitSettlement:
                    amountSplitType: FLAT
                    splitSettlementDetails:
                      - splitAccountId: PRIMARY
                        value: 60
                summary: Split to Primary merchant account
                description: >-
                  This is specific case where fix split is to settle to primary
                  merchant and leftover funds to preconfigured split account.
                  Note that this setup is required account configuration,
                  contact support team 
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  payload:
                    type: object
                    properties:
                      intentLinkDetail:
                        type: object
                        properties:
                          gpay:
                            type: string
                            description: |
                              Deep-link URI to open Google Pay
                          phonepe:
                            type: string
                            description: |
                              Deep-link URI to open PhonePe
                          paytm:
                            type: string
                            description: |
                              Deep-link URI to open Paytm
                          upi:
                            type: string
                            description: |
                              Generic UPI deep-link (works with any UPI app)
                        required:
                          - gpay
                          - phonepe
                          - paytm
                          - upi
                        x-apidog-orders:
                          - gpay
                          - phonepe
                          - paytm
                          - upi
                      qrCode:
                        type: object
                        properties:
                          qrCode:
                            type: string
                            description: |
                              Base64-encoded QR code image to render inline
                          qrUrl:
                            type: string
                            description: |
                              Raw UPI URL encoded in the QR
                          qrUrlType:
                            type: string
                            description: |
                              Always PAY for dynamic QR
                        required:
                          - qrCode
                          - qrUrl
                          - qrUrlType
                        x-apidog-orders:
                          - qrCode
                          - qrUrl
                          - qrUrlType
                      transactionId:
                        type: string
                        description: Enkash transaction ID
                    required:
                      - intentLinkDetail
                      - qrCode
                      - transactionId
                    x-apidog-orders:
                      - transactionId
                      - intentLinkDetail
                      - qrCode
                required:
                  - success
                  - payload
                x-apidog-orders:
                  - success
                  - payload
              example:
                response_code: 0
                response_message: SUCCESS
                payload:
                  transactionId: EKP20240601123456789
                  intentLinkDetail:
                    gpay: >-
                      gpay://upi/pay?pa=merchant%40bank&pn=MerchantName&am=500.00&cu=INR&tid=EKP20240601123456789
                    phonepe: >-
                      phonepe://pay?pa=merchant%40bank&pn=MerchantName&am=500.00&cu=INR&tid=EKP20240601123456789
                    paytm: >-
                      paytmmp://pay?pa=merchant%40bank&pn=MerchantName&am=500.00&cu=INR&tid=EKP20240601123456789
                    upi: >-
                      upi://pay?pa=merchant%40bank&pn=MerchantName&am=500.00&cu=INR&tid=EKP20240601123456789
                  qrCode:
                    qrCode: iVBORw0KGgoAAAANSUhEUgAA...<base64-encoded PNG>
                    qrUrl: >-
                      upi://pay?pa=merchant%40bank&pn=MerchantName&am=500.00&cu=INR&tid=EKP20240601123456789
                    qrUrlType: PAY
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  response_code:
                    type: integer
                    description: >-
                      Application-level error code representing the business
                      outcome of the API request.
                    x-apidog-mock: '106'
                  response_message:
                    type: string
                    description: >-
                      Human-readable message describing the outcome of the
                      request.
                    x-apidog-mock: >-
                      Merchant with provided parameters does not exist in
                      system.
                  payload:
                    type: string
                    description: Contains additional data related to the response.
                    x-apidog-mock: >-
                      Merchant with provided parameters does not exist in
                      system.
                required:
                  - response_code
                  - response_message
                  - payload
                x-apidog-orders:
                  - response_code
                  - response_message
                  - payload
              example:
                response_code: 1
                response_message: >-
                  splitSettlement.amountSplitType must be one of [FLAT,
                  PERCENTAGE]
                payload: >-
                  splitSettlement.amountSplitType must be one of [FLAT,
                  PERCENTAGE]
          headers: {}
          x-apidog-name: Bad Request
      security: []
      x-apidog-folder: Payment Gateway/APIs - Payment Gateway /Split Settlement
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-37559142-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
