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

      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.No
      encCardInfo StringCard information in encrypted form.No
      authMode StringAuthentication mode for Cards.
      Inputs could be: OTP/PIN.
      No
      paymentMode StringUser selected payment mode one of the below
      value (DEBIT_CARD,CREDIT_CARD BANK_MANDATE).
      No
      channelId StringChannel by which call is initiated
      WEB: for the web server
      WAP: for the mobile website and apps.
      Yes
      channelCode StringPaytm BankCode corresponding to the bank which has been selected for payment by user.Yes
      mpin StringAccess token.No
      cardInfo StringsaveCardId | cardNo | cvv | expDate.No
      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)
      bank StringThe name of bank that was used for this transaction.No
      mandateAuthMode StringAuth mode supported by e mandate banks.Conditional (Mandatory for emandate and if authorization needs to be skipped on npci page.)

      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:


      E-Mandate


      NameDescription
      ACCEPTED_REF_NOAccepted Reference Number of Mandate from NPCI.
      REJECTED_BYIf the mandate has been rejected, then who has rejected it.
      ORDERIDOrder Id of mandate creation Request.
      PAYMENTMODEThe payment mode used for transaction.
      MANDATE_TYPEType of Mandate.
      MERCHANT_CUST_IDCustomer Id of user provided by Merchant.
      IS_ACCEPTEDMandate Request accepted or not.
      MIDMerchant unique identifier, Unique Id for merchant provided by Paytm.
      RESPMSGDescription message is linked with each respcode.
      STATUSThis contains the transaction status.
      RESPCODECodes refer to a particular reason of payment failure/success.
      SUBS_IDSubscriptionId created for this mandate.
      TXNDATEMandate Creation date/ date on which transaction has been done.
      CHECKSUMHASHchecksum hash of the parameters present.

      Paper Mandate


      NameDescription
      ORDERIDOrder Id of mandate creation request.
      PAYMENTMODEPayment Mode.
      MANDATE_TYPEType Of Mandate.
      MERCHANT_CUST_IDCustomer Id of user provided by Merchant.
      MIDMerchant unique identifier, Unique Id for merchant provided by Paytm.
      RESPMSGDescription message is linked with each respcode.
      STATUSThis contains the transaction status.
      RESPCODECodes refer to a particular reason of payment failure/success.
      SUBS_IDSubscriptionId created for this mandate.
      TXNDATEMandate Creation date/ date on which transaction has been done.
      CHECKSUMHASHChecksum hash of the parameters present.

      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.
      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.

      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.