> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Authorization Request

> Use this API to create an authorisation request for a particular subscription. This API is applicable only if you have created a subscription via Create Seamless Subscription API. Use the response of the Create Seamless Subscription API to get the supported banks for E_MANDATE and supported UPI handles.



## OpenAPI

````yaml post /api/v2/subscriptions/seamless/authorization
openapi: 3.0.0
info:
  title: Cashfree Subscription API
  description: >-
    Create and manage subscriptions and collect recurring payments from
    customers easily with Cashfree Subscriptions.
  version: v2
servers:
  - url: https://sandbox.cashfree.com
    description: Sandbox server
  - url: https://api.cashfree.com
    description: Production server
security: []
externalDocs:
  url: https://docs.cashfree.com/reference/postman-collection-1
  description: This url will have the information of all the APIs.
paths:
  /api/v2/subscriptions/seamless/authorization:
    post:
      tags:
        - Seamless APIs
      summary: Create Authorization Request
      description: >-
        Use this API to create an authorisation request for a particular
        subscription. This API is applicable only if you have created a
        subscription via Create Seamless Subscription API. Use the response of
        the Create Seamless Subscription API to get the supported banks for
        E_MANDATE and supported UPI handles.
      operationId: createAuthorizationRequest
      parameters:
        - name: x-client-id
          in: header
          schema:
            type: string
            example: '{{X-Client-Id}}'
        - name: x-client-secret
          in: header
          schema:
            type: string
            example: '{{X-Client-Secret}}'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                subReferenceId:
                  type: integer
                  description: Reference ID for the subscription.
                  example: 123456
                merchantTxnId:
                  type: string
                  description: Unique transaction ID for the merchant.
                  example: merchant-txn-id-1
                authPaymentInfo:
                  type: object
                  properties:
                    paymentType:
                      type: string
                      description: Type of payment (e.g., UPI, CARD, E_MANDATE).
                      example: UPI
                    vpa:
                      type: string
                      description: Virtual Payment Address for UPI payments.
                      example: johndoe@upi
                    authFlow:
                      type: string
                      description: Type of UPI flow (e.g., UPI_COLLECT, UPI_INTENT).
                      example: UPI_COLLECT
                    cardNumber:
                      type: string
                      description: Card number for card payments.
                      example: '4444333322221111'
                    cardHolderName:
                      type: string
                      description: Name on the card.
                      example: John Doe
                    cardCvv:
                      type: string
                      description: CVV number of the card.
                      example: '123'
                    cardExpiryMonth:
                      type: string
                      description: Expiry month of the card.
                      example: '12'
                    cardExpiryYear:
                      type: string
                      description: Expiry year of the card.
                      example: '2099'
                    accountHolderName:
                      type: string
                      description: Account holder name for E_MANDATE.
                      example: John Doe
                    accountNumber:
                      type: string
                      description: Account number for E_MANDATE.
                      example: '1234567890'
                    bankId:
                      type: string
                      description: Bank identifier for E_MANDATE.
                      example: SBIN
                    accountType:
                      type: string
                      description: Account type for E_MANDATE (e.g., SAVINGS).
                      example: SAVINGS
                    authMode:
                      type: string
                      description: >-
                        Authentication mode for E_MANDATE (e.g., DEBIT_CARD,
                        NET_BANKING).
                      example: DEBIT_CARD
                    pNachFileId:
                      type: string
                      description: Physical Nach File ID for mandate.
                      example: '1475380791'
                    mandateCreationDate:
                      type: string
                      description: Date the mandate was created.
                      example: '2023-07-25'
                    mandateStartDate:
                      type: string
                      description: Start date of the mandate.
                      example: '2023-07-27'
            examples:
              upiAuthorizationRequest:
                summary: UPI Authorization Request
                value:
                  subReferenceId: 123456
                  merchantTxnId: merchant-txn-id-1
                  authPaymentInfo:
                    paymentType: UPI
                    vpa: johndoe@upi
                    authFlow: UPI_COLLECT
              cardAuthorizationRequest:
                summary: Card Authorization Request
                value:
                  subReferenceId: 123456
                  merchantTxnId: merchant-txn-id-2
                  authPaymentInfo:
                    paymentType: CARD
                    cardNumber: '4444333322221111'
                    cardHolderName: John Doe
                    cardCvv: '123'
                    cardExpiryMonth: '12'
                    cardExpiryYear: '2099'
              eMandateAuthorizationRequest:
                summary: E_MANDATE Authorization Request
                value:
                  subReferenceId: 123456
                  merchantTxnId: merchant-txn-id-3
                  authPaymentInfo:
                    paymentType: E_MANDATE
                    accountHolderName: John Doe
                    accountNumber: '1234567890'
                    bankId: SBIN
                    accountType: SAVINGS
                    authMode: DEBIT_CARD
              physicalMandateRequest:
                summary: Seamless Physical Mandate Request
                value:
                  subReferenceId: 260684
                  authPaymentInfo:
                    paymentType: PHYSICAL_MANDATE
                    pNachFileId: '1475380791'
                    accountHolderName: John Doe
                    accountNumber: '1234567890'
                    bankId: SBIN
                    accountType: SAVINGS
                    ifsc: SBIN0001852
                    mandateCreationDate: '2023-07-25'
                    mandateStartDate: '2023-07-27'
      responses:
        '200':
          description: Successful authorization request.
          content:
            application/json:
              examples:
                defaultAuthorization:
                  summary: Default Authorization Response
                  value:
                    status: 200
                    message: Authorization Created
                    data:
                      subReferenceId: 123456
                      authId: 23456789
                      authStatus: INITIALIZED
                      merchantTxnId: txn.id-1_2_3
                      authPaymentData:
                        paymentType: UPI
                eMandateAuthorization:
                  summary: E_MANDATE Authorization Response
                  value:
                    status: 200
                    message: Authorization Created
                    data:
                      subReferenceId: 123456
                      authId: 23456789
                      authStatus: INITIALIZED
                      authPaymentData:
                        paymentType: E_MANDATE
                        link: https://enach.npci.org.in/onmags/sendRequest
                        method: POST
                        postData:
                          BankID=HDFC: null
                          AuthMode=DebitCard: null
                          Data=xyz: null
                upiIntentAuthorization:
                  summary: UPI Intent Authorization Response
                  value:
                    status: 200
                    message: Authorization Created
                    data:
                      authId: 4302698
                      subReferenceId: 4576585
                      authStatus: INITIALIZED
                      authPaymentData:
                        paymentType: UPI
                        upiIntentData:
                          androidAuthAppLinks:
                            AMAZONPAY: intent://mandate?<upi-deeplink-params>
                            BHIM: intent://mandate?<upi-deeplink-params>
                            GPAY: gpay://upi/mandate?<upi-deeplink-params>
                            PAYTM: intent://mandate?<upi-deeplink-params>
                            DEFAULT: upi://mandate?<upi-deeplink-params>
                          iosAuthAppLinks:
                            PAYTM: paytm://upi/mandate?<upi-deeplink-params>
                upiQrAuthorization:
                  summary: UPI QR Authorization Response
                  value:
                    status: 200
                    message: Authorization Created
                    data:
                      authId: 4302759
                      subReferenceId: 4576585
                      authStatus: INITIALIZED
                      authPaymentData:
                        paymentType: UPI
                        qrData: upi://mandate?<upi-QR-params>
                cardAuthorization:
                  summary: Card Authorization Response
                  value:
                    status: 200
                    message: Authorization Created
                    data:
                      subReferenceId: 12345678
                      authId: 232363523
                      authStatus: INITIALIZED
                      authPaymentData:
                        paymentType: CARD
                        link: >-
                          https://centinelapi.cardinalcommerce.com/V2/Cruise/StepUp
                        redirectMethod: post
                        postData:
                          JWT: eyJhb...
                          MD: '125235236'
                physicalMandateAuthorization:
                  summary: Physical Mandate Authorization Response
                  value:
                    status: 200
                    message: Authorization Created
                    data:
                      authId: 72637
                      subReferenceId: 260684
                      authStatus: INITIALIZED
                      authPaymentData:
                        paymentType: PHYSICAL_MANDATE
        '400':
          description: Bad request due to invalid parameters.
          content:
            application/json:
              examples:
                subscriptionNotExist:
                  summary: Subscription Not Exist Error
                  value:
                    status: ERROR
                    subCode: '400'
                    message: 'Subscription Does not exist for subReferenceId : 1060772'
                invalidPaymentType:
                  summary: Invalid Payment Type Error
                  value:
                    status: ERROR
                    subCode: '400'
                    message: Invalid payment type, use 'E_MANDATE', 'UPI' or 'CARD'
                invalidMerchantId:
                  summary: Invalid Merchant ID Error
                  value:
                    status: ERROR
                    subCode: '400'
                    message: invalid merchantId for subscription
                invalidVPA:
                  summary: Invalid VPA Error
                  value:
                    status: ERROR
                    subCode: '400'
                    reason: vpa is Invalid, check your param.
                invalidAuthFlow:
                  summary: Invalid Auth Flow Error
                  value:
                    status: ERROR
                    subCode: '400'
                    reason: authFlow is Invalid, check your param.
                authorizationPaymentInfoMismatch:
                  summary: Authorization Payment Info Mismatch Error
                  value:
                    status: ERROR
                    subCode: '400'
                    message: >-
                      Authorization payment info doesn't match with subscription
                      creation payment info.
                tpvNotSupported:
                  summary: TPV Not Supported Error
                  value:
                    status: ERROR
                    subCode: '400'
                    message: TPV currently not allowed for Intent and Qr auth flow
        '500':
          description: Internal server error.
          content:
            application/json:
              examples:
                serverError:
                  summary: General Server Error
                  value:
                    status: ERROR
                    message: Server encountered an unexpected condition.

````