# Create UPI Mandate

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/upi-mandate:
    post:
      summary: Create UPI Mandate
      deprecated: false
      description: >-

        :::highlight purple 📌

        Use this API to create a UPI mandate, allowing you to set up automated
        recurring payments directly from your customer’s UPI-linked bank
        account. This ensures secure, hassle-free collections for subscriptions,
        EMIs, or any recurring billing.

        :::
      tags:
        - Payment Gateway/APIs - Payment Gateway /UPI Autopay
      parameters:
        - name: merchantAccessKey
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: Authorization
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-apidog-refs: {}
              properties:
                mandateCreateType:
                  type: string
                  enum:
                    - API
                    - QR_CODE
                    - CHECKOUT
                  x-apidog-enum:
                    - value: API
                      name: API Flow
                      description: ''
                    - value: QR_CODE
                      name: QRCode Flow
                      description: ''
                    - value: CHECKOUT
                      name: Checkout URL Flow
                      description: ''
                  default: API
                  description: Flow Type
                firstDebitAmount:
                  type: string
                  description: Triggers auto first debit when valid
                referenceId:
                  type: string
                  description: Merchant unique mandate reference
                amount:
                  type: integer
                  description: Mandate amount / max amount
                amountRule:
                  type: string
                  enum:
                    - EXACT
                    - MAX
                  x-apidog-enum:
                    - value: EXACT
                      name: ''
                      description: ''
                    - value: MAX
                      name: ''
                      description: ''
                  description: Mandate amount rule
                currency:
                  type: string
                  description: Amount Currency
                payer:
                  type: object
                  properties:
                    vpa:
                      type: string
                      description: Payer VPA/UPI ID
                    name:
                      type: string
                      description: Payer Name which will be returned in Check VPA response
                    account:
                      type: string
                      description: >-
                        Payer Account Number This field to be passed if
                        accountValidation flag is true
                    accountValidation:
                      type: boolean
                      description: >-
                        This parameter is to validate the account number for
                        mandate creation. This parameter will take care of
                        Thirdparty Account validation during mandate creation.
                        In case of mismatch of account, Revoke requested will be
                        auto fired.
                  required:
                    - vpa
                    - name
                  x-apidog-orders:
                    - vpa
                    - name
                    - accountValidation
                    - account
                  description: >-
                    Payer Details (Mandatory only in case of API Mandate
                    Creation Type)
                mandateName:
                  type: string
                  description: Display name
                expiry:
                  type: integer
                  description: Minutes until auth window expires
                recurrence:
                  type: object
                  properties:
                    period:
                      type: string
                      enum:
                        - ONETIME
                        - DAILY
                        - WEEKLY
                        - FORTNIGHTLY
                        - MONTHLY
                        - QUATERLY
                        - HALF_YEARLY
                        - YEARLY
                        - ASPRESENTED
                      x-apidog-enum:
                        - value: ONETIME
                          name: ''
                          description: ''
                        - value: DAILY
                          name: ''
                          description: ''
                        - value: WEEKLY
                          name: ''
                          description: ''
                        - value: FORTNIGHTLY
                          name: ''
                          description: ''
                        - value: MONTHLY
                          name: ''
                          description: ''
                        - value: QUATERLY
                          name: ''
                          description: ''
                        - value: HALF_YEARLY
                          name: ''
                          description: ''
                        - value: YEARLY
                          name: ''
                          description: ''
                        - value: ASPRESENTED
                          name: ''
                          description: ''
                      description: Mandate Recurrence Pattern
                    rule:
                      type: string
                      enum:
                        - 'ON'
                        - BEFORE
                        - AFTER
                      x-apidog-enum:
                        - value: 'ON'
                          name: ''
                          description: ''
                        - value: BEFORE
                          name: ''
                          description: ''
                        - value: AFTER
                          name: ''
                          description: ''
                      description: >-
                        Recurrence Rule Type

                        (ON/BEFORE/AFTER) If Pattern is other than ONETIME/AS
                        PRESENTED/DAILY, then ruleType is mandatory
                    value:
                      type: string
                      description: >-
                        Recurrence Rule Value (Defines the date/day on which the
                        mandate amount will be debited) For WEEKLY, If the start
                        date (day) = Monday, Rule Value = 1, for Tuesday it is
                        2………for Sunday it is 7. For FORTNIGHTLY, For Start Date
                        (1st – 15th) Rule Value = Start Date For Start Date
                        (16th – 31th) Rule Value = Start Date – 15 For MONTHLY
                        and greater than Monthly frequencies Rule Value = Start
                        Date If Pattern is other than ONETIME/AS
                        PRESENTED/DAILY, then ruleValue is mandatory
                  required:
                    - period
                  x-apidog-orders:
                    - period
                    - rule
                    - value
                  description: Recurrence Information Block
                validity:
                  type: object
                  properties:
                    startAt:
                      type: string
                      description: >-
                        Mandate start date, expected date format (YYYY-MM-DD
                        HH:MM:SS)
                    endAt:
                      type: string
                      description: >-
                        Mandate end date, expected date format (YYYY-MM-DD
                        HH:MM:SS)
                  required:
                    - startAt
                    - endAt
                  x-apidog-orders:
                    - startAt
                    - endAt
                  description: Start and End Date
                upiReferenceUrl:
                  type: string
                  description: >-
                    Ref URL for invoice details for mandate which will be shown
                    to Payer.
                description:
                  type: string
                  description: |
                    Narration
                upiPurposeCode:
                  type: string
                  description: >-
                    Type of mandate Merchants should not send 01, (00-Default
                    (P2P) 01-SEBI(BIMA ASBA) 02-AMC 03-Travel 04-Hospitality
                    05-Hospital 06-Telecom 07-Insurance 08-Education 09-Gifting
                    10-Others 14-Recurring Mandate) AZ - Mandate
                    Interoperability. This field will be mandatory for UPI
                    Mandate Interop transactions.
                revocableByPayer:
                  type: boolean
                  description: >-
                    Whether payer can revoke. t will be always true expect for
                    IPO mamdates.
              required:
                - mandateCreateType
                - referenceId
                - amount
                - amountRule
                - currency
                - mandateName
                - expiry
                - recurrence
                - validity
                - description
                - revocableByPayer
              x-apidog-orders:
                - referenceId
                - amount
                - amountRule
                - currency
                - payer
                - mandateName
                - expiry
                - revocableByPayer
                - recurrence
                - validity
                - upiReferenceUrl
                - description
                - upiPurposeCode
                - mandateCreateType
                - firstDebitAmount
            examples:
              '1':
                value:
                  referenceId: TXN9876543
                  amount: 100
                  amountRule: EXACT
                  currency: INR
                  mandateName: Lula Hammes
                  payer:
                    vpa: cupid74@okicici
                    name: Cupid Data
                  expiry: 72
                  blockFund: false
                  revocableByPayer: true
                  recurrence:
                    period: MONTHLY
                    rule: 'ON'
                    value: '2'
                  validity:
                    startAt: '2025-07-20 00:00:00'
                    endAt: '2025-10-20 00:00:00'
                  upiReferenceUrl: https://www.example.com/
                  description: Recurring Payment for Subscription
                  upiPurposeCode: '14'
                  mandateCreationType: API
                summary: API Flow
              '2':
                value:
                  referenceId: TXN9876543
                  amount: 100
                  amountRule: EXACT
                  currency: INR
                  mandateName: Lula Hammes
                  expiry: 72
                  blockFund: false
                  revocableByPayer: true
                  recurrence:
                    period: ONETIME
                  validity:
                    startAt: '2025-07-20 00:00:00'
                    endAt: '2025-10-20 00:00:00'
                  upiReferenceUrl: https://www.example.com/
                  description: Recurring Payment for Subscription
                  upiPurposeCode: '14'
                  mandateCreationType: QR_CODE
                summary: QR_CODE
              '3':
                value:
                  referenceId: TXN9876543
                  amount: 100
                  amountRule: EXACT
                  currency: INR
                  mandateName: Lula Hammes
                  expiry: 72
                  blockFund: false
                  revocableByPayer: true
                  recurrence:
                    period: ONETIME
                  validity:
                    startAt: '2025-07-20 00:00:00'
                    endAt: '2025-10-20 00:00:00'
                  upiReferenceUrl: https://www.example.com/
                  description: Recurring Payment for Subscription
                  upiPurposeCode: '14'
                  mandateCreationType: CHECKOUT
                summary: CHECKOUT
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                x-apidog-refs: {}
                x-apidog-orders:
                  - response_code
                  - response_message
                  - payload
                properties:
                  response_code:
                    type: integer
                  response_message:
                    type: string
                  payload:
                    type: object
                    properties:
                      referenceId:
                        type: string
                      pspRefNo:
                        type: string
                      umn:
                        type: string
                      mandateTransactionId:
                        type: string
                      amount:
                        type: integer
                      amountRule:
                        type: string
                        enum:
                          - EXACT
                          - MAX
                        x-apidog-enum:
                          - value: EXACT
                            name: ''
                            description: ''
                          - value: MAX
                            name: ''
                            description: ''
                      currency:
                        type: string
                      payer:
                        type: object
                        properties:
                          vpa:
                            type: string
                          name:
                            type: string
                          account:
                            type: string
                          accountValidation:
                            type: boolean
                        required:
                          - vpa
                          - name
                          - accountValidation
                        x-apidog-orders:
                          - vpa
                          - name
                          - account
                          - accountValidation
                      mandateName:
                        type: string
                      expiry:
                        type: integer
                      blockFund:
                        type: boolean
                      revocableByPayer:
                        type: boolean
                      recurrence:
                        type: object
                        properties:
                          period:
                            type: string
                            enum:
                              - ONETIME
                              - DAILY
                              - WEEKLY
                              - FORTNIGHTLY
                              - MONTHLY
                              - QUATERLY
                              - HALF_YEARLY
                              - YEARLY
                              - ASPRESENTED
                            x-apidog-enum:
                              - value: ONETIME
                                name: ''
                                description: ''
                              - value: DAILY
                                name: ''
                                description: ''
                              - value: WEEKLY
                                name: ''
                                description: ''
                              - value: FORTNIGHTLY
                                name: ''
                                description: ''
                              - value: MONTHLY
                                name: ''
                                description: ''
                              - value: QUATERLY
                                name: ''
                                description: ''
                              - value: HALF_YEARLY
                                name: ''
                                description: ''
                              - value: YEARLY
                                name: ''
                                description: ''
                              - value: ASPRESENTED
                                name: ''
                                description: ''
                          rule:
                            type: string
                            enum:
                              - 'ON'
                              - BEFORE
                              - AFTER
                            x-apidog-enum:
                              - value: 'ON'
                                name: ''
                                description: ''
                              - value: BEFORE
                                name: ''
                                description: ''
                              - value: AFTER
                                name: ''
                                description: ''
                          value:
                            type: string
                        required:
                          - period
                          - rule
                          - value
                        x-apidog-orders:
                          - period
                          - rule
                          - value
                      validity:
                        type: object
                        properties:
                          startAt:
                            type: string
                          endAt:
                            type: string
                        required:
                          - startAt
                          - endAt
                        x-apidog-orders:
                          - startAt
                          - endAt
                      pausePeriod:
                        type: object
                        properties:
                          startAt:
                            type: string
                          endAt:
                            type: string
                        required:
                          - startAt
                          - endAt
                        x-apidog-orders:
                          - startAt
                          - endAt
                      upiReferenceUrl:
                        type: string
                      description:
                        type: string
                      mcc:
                        type: string
                      upiPurposeCode:
                        type: string
                      status:
                        type: string
                        enum:
                          - CREATED
                          - ACTIVE
                          - PAUSE
                          - REVOKED
                          - PROCESSING
                          - PENDING
                        x-apidog-enum:
                          - value: CREATED
                            name: ''
                            description: ''
                          - value: ACTIVE
                            name: ''
                            description: ''
                          - value: PAUSE
                            name: ''
                            description: ''
                          - value: REVOKED
                            name: ''
                            description: ''
                          - value: PROCESSING
                            name: ''
                            description: ''
                          - value: PENDING
                            name: ''
                            description: ''
                      createdAt:
                        type: string
                      revoked:
                        type: boolean
                      orgTxnId:
                        type: string
                      paymentDetail:
                        type: object
                        properties:
                          intentLinks:
                            type: object
                            properties:
                              gpay:
                                type: string
                              phonepe:
                                type: string
                              paytm:
                                type: string
                              upi:
                                type: string
                                description: General link
                            x-apidog-orders:
                              - gpay
                              - phonepe
                              - paytm
                              - upi
                            required:
                              - gpay
                              - phonepe
                              - paytm
                              - upi
                          qrCode:
                            type: string
                            description: base64 QR String
                          checkoutUrl:
                            type: string
                        x-apidog-orders:
                          - intentLinks
                          - qrCode
                          - checkoutUrl
                    x-apidog-refs: {}
                    x-apidog-orders:
                      - referenceId
                      - pspRefNo
                      - umn
                      - mandateTransactionId
                      - amount
                      - amountRule
                      - currency
                      - payer
                      - mandateName
                      - expiry
                      - blockFund
                      - revocableByPayer
                      - recurrence
                      - validity
                      - pausePeriod
                      - upiReferenceUrl
                      - description
                      - mcc
                      - upiPurposeCode
                      - status
                      - createdAt
                      - revoked
                      - orgTxnId
                      - paymentDetail
                    required:
                      - referenceId
                      - pspRefNo
                      - amount
                      - amountRule
                      - currency
                      - payer
                      - mandateName
                      - expiry
                      - recurrence
                      - validity
                      - upiReferenceUrl
                      - description
                      - mcc
                      - upiPurposeCode
                      - status
                      - createdAt
                      - paymentDetail
                required:
                  - response_code
                  - response_message
                  - payload
          headers: {}
          x-apidog-name: OK
      security: []
      x-apidog-folder: Payment Gateway/APIs - Payment Gateway /UPI Autopay
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-13730808-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
