• Getting Started
    • Mobile Integration (Android/IOS)
      Enterprise Solutions
      Retail Solutions
      Accept Payments
      Process Payments
      Disbursals
      API References
      Testing
      Refunds
      Guides
      Other Processes
      Mini Program Platform

      Authenticate Subscription

      Checksum required: Yes

      Use Case


      This API can be used by merchants to redirect customers to authorise the subscription. Please note the API would redirect users to Bank page for authorisation in case of Wallet, Cards & E-Mandate. In case of Paper Mandates the user would be redirected back to the merchant’s page for mandate form download.

      Paths


      Production URL: https://securegw.paytm.in/order/pay?mid=YOUR_MID_HERE&orderId=YOUR_ORDER_ID
      Testing URL: https://securegw-stage.paytm.in/order/pay?mid=YOUR_MID_HERE&orderId=YOUR_ORDER_ID

      Request Attributes


      ATTRIBUTEDescriptionMandatory
      txnToken StringtxnToken paytm security token for a transaction valid for the 15 minutes.Yes
      authMode StringAuthentication mode for Cards.
      Inputs could be: OTP.
      No
      paymentMode StringUser selected payment mode one of the below
      value (DEBIT_CARD,CREDIT_CARD BANK_MANDATE, UPI, UPI_INTENT).
      Yes
      cardInfo StringsaveCardId | cardNo | cvv | expDate.Conditional (Mandatory for CREDIT/DEBIT CARD)
      channelCode StringPaytm BankCode corresponding to the bank which has been selected for payment by user.Conditional (Mandatory for BANK_MANDATE)
      account_number StringPayer account details used for transactionConditional (Mandatory for BANK_MANDATE) .
      bankIfsc StringPayer/ User Bank IFSC Code.Conditional (Mandatory for BANK_MANDATE)
      USER_NAME StringPayer/User account holder name.Conditional (Mandatory for BANK_MANDATE)
      ACCOUNT_TYPE StringType of Account
      Possible values
      ("ISA" - Individual Savings Account,
      "CA" - Current Account, "OTHERS").
      Conditional (Mandatory for BANK_MANDATE)
      SUBSCRIPTION_ID Stringsubscription id created in subscription/create API.Conditional (Mandatory for BANK_MANDATE)
      mandateAuthMode StringAuth mode supported by e mandate banks.
      Possible values: NET_BANKING, DEBIT_CARD
      Conditional (Mandatory for emandate and if authorization needs to be skipped on npci page.)
      payerAccount StringUPI Address of customerConditional (Mandatory for UPI)

      Sample Request

      <html>
         <head>
            <title>Authenticate Subscription</title>
         </head>
         <body>
            <form name="paytm_form" method="POST" action="https://securegw-stage.paytm.in/order/pay?mid=INTEGR776XXXXXX29383&orderId=ORDR_20200429190414">
               <input type="hidden" name="txnToken" value="b5da4546a065409292eec31de56ca17c1588167265733" /> 
               <input type="hidden" name="SUBSCRIPTION_ID" value="64665" />
               <input type="hidden" name="paymentMode" value="CREDIT_CARD" />
               <input type="hidden" name="AUTH_MODE" value="OTP" />
               <input type="hidden" name="cardInfo" value="|431581XXXXXX7009|123|122031" />
            </form>
            <script type="text/javascript">
               document.paytm_form.submit();
            </script>
         </body>
      </html>

      Response Attributes:


      CC/DC


      NameDescription
      ORDERIDOrder Id of Subscription creation Request.
      MIDMerchant unique identifier, Unique Id for merchant provided by Paytm.
      TXNIDPaytm Transaction Id.
      TXNAMOUNTOrder value of the transaction in INR.
      PAYMENTMODEMode of Payment (CC or DC).
      CURRENCYCurrency of Transaction Amount.
      TXNDATESubscription Creation Date.
      STATUSThis contains the transaction status - (TXN_SUCCESS, PENDING, TXN_FAILURE).
      RESPCODECodes refer to a particular reason of payment failure/success.
      RESPMSGDescription message is linked with each respcode.
      GATEWAYNAMEGateway Name used by Paytm.
      BANKTXNIDThe transaction Id sent by the bank/wallet (NULL or empty string if the transaction doesn't reaches to the bank).
      SUBS_IDSubscription Id (valid incase of subscription).
      BANKNAMEName of issuing bank of the payment instrument used by customer.
      CHECKSUMHASHSecurity parameter to avoid tampering. Verified using server side checksum utility provided by Paytm.
      BINStarting 6 digits of card number
      LASTFOURDIGITSLast 4 digits of card number
      BANKNAMEName of the Bank
      cardSchemeCard Scheme- VISA, MASTER

      Response Codes and Messages


      respCodestatusrespMessage
      1SUCCESSTransaction Successful.
      141FAILURETransaction cancelled by customer after landing on Payment Gateway Page.
      227FAILUREPayment Failed due to a Bank Failure. Please try after some time.
      507FAILUREWhen user's account number provided by merchant doesn't match with the one used for payment(Account Number Mismatch).
      508FAILUREWhen account Details of the User could not be fetch.(Account Not Exists) (In case of Paytm Payments Bank only).
      810FAILUREPage closed by customer after landing on Payment Gateway Page.
      8102FAILURETransaction cancelled by customer post login. Customer had sufficient Wallet balance for completing transaction.
      8103FAILURETransaction cancelled by customer post login. Customer had in-sufficient Wallet balance for completing transaction.