search

Authenticate Subscription

Method: Post

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

ATTRIBUTE Description

txnToken

String

mandatory
txnToken paytm security token for a transaction valid for the 15 minutes.

authMode

String

optional
Authentication mode for Cards.
Inputs could be: OTP.

paymentMode

String

mandatory
User selected payment mode one of the below
value (DEBIT_CARD,CREDIT_CARD BANK_MANDATE, UPI, UPI_INTENT).

cardInfo

String

Conditional 

saveCardId | cardNo | cvv | expDate.

Mandatory for CREDIT/DEBIT CARD

channelCode

String

Conditional 

Paytm BankCode corresponding to the bank which has been selected for payment by user.

Mandatory for BANK_MANDATE

account_number

String

Conditional 

Payer account details used for transaction

Mandatory for BANK_MANDATE

bankIfsc

String

Conditional 

Payer/ User Bank IFSC Code.

Mandatory for BANK_MANDATE

USER_NAME

String

Conditional 

Payer/User account holder name.

Mandatory for BANK_MANDATE

ACCOUNT_TYPE

String

Conditional 

Type of Account
Possible values
("ISA" - Individual Savings Account,
"CA" - Current Account, "OTHERS").

Mandatory for BANK_MANDATE

SUBSCRIPTION_ID

String

Conditional 

subscription id created in subscription/create API.

Mandatory for BANK_MANDATE

mandateAuthMode

String

Conditional 

Auth mode supported by e mandate banks.
Possible values: NET_BANKING, DEBIT_CARD

Mandatory for emandate and if authorization needs to be skipped on npci page

payerAccount

String

Conditional 

UPI Address of customer

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

Name Description
ORDERID Order Id of Subscription creation Request.
MID Merchant unique identifier, Unique Id for merchant provided by Paytm.
TXNID Paytm Transaction Id.
TXNAMOUNT Order value of the transaction in INR.
PAYMENTMODE Mode of Payment (CC or DC).
CURRENCY Currency of Transaction Amount.
TXNDATE Subscription Creation Date.
STATUS This contains the transaction status - (TXN_SUCCESS, PENDING, TXN_FAILURE).
RESPCODE Codes refer to a particular reason of payment failure/success.
RESPMSG Description message is linked with each respcode.
GATEWAYNAME Gateway Name used by Paytm.
BANKTXNID The transaction Id sent by the bank/wallet (NULL or empty string if the transaction doesn't reaches to the bank).
SUBS_ID Subscription Id (valid incase of subscription).
BANKNAME Name of issuing bank of the payment instrument used by customer.
CHECKSUMHASH Security parameter to avoid tampering. Verified using server side checksum utility provided by Paytm.
BIN Starting 6 digits of card number
LASTFOURDIGITS Last 4 digits of card number
BANKNAME Name of the Bank
cardScheme Card Scheme- VISA, MASTER
<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="BALANCE" />
         <input type="hidden" name="AUTH_MODE" value="OTP" />
      </form>
      <script type="text/javascript">
         document.paytm_form.submit();
      </script>
   </body>
</html>

Response Attributes

Wallet

Name Description
ORDERID Order Id of Subscription creation Request.
MID Merchant unique identifier, Unique Id for merchant provided by Paytm.
TXNID Paytm Transaction Id.
TXNAMOUNT Order value of the transaction in INR.
PAYMENTMODE Mode of Payment (PPI).
CURRENCY Currency of Transaction Amount.
TXNDATE Subscription Creation Date.
STATUS This contains the transaction status - (TXN_SUCCESS, PENDING, TXN_FAILURE).
RESPCODE Codes refer to a particular reason of payment failure/success.
RESPMSG Description message is linked with each respcode.
GATEWAYNAME Gateway Name used by Paytm - (WALLET).
BANKTXNID The transaction Id sent by the bank/wallet (NULL or empty string if the transaction doesn't reaches to the bank).
SUBS_ID Subscription Id (valid incase of subscription).
BANKNAME Name of issuing bank of the payment instrument used by customer - (WALLET).
CHECKSUMHASH Security parameter to avoid tampering. Verified using server side checksum utility provided by Paytm.
<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="BANK_MANDATE" />
         <input type="hidden" name="AUTH_MODE" value="USRPWD" />
         <input type="hidden" name="ACCOUNT_TYPE" value="ISA" />
         <input type="hidden" name="account_number" value="917777777777" />
         <input type="hidden" name="USER_NAME" value="Lalit" />
         <input type="hidden" name="channelCode" value="PPBL" />
         <input type="hidden" name="mandateAuthMode" value="NET_BANKING" />
         <input type="hidden" name="bankIfsc" value="PYTM0123456" />
      </form>
      <script type="text/javascript">
         document.paytm_form.submit();
      </script>
   </body>
</html>

Response Attributes

E-Mandate

Name Description
ACCEPTED_REF_NO Accepted Reference Number of Mandate from NPCI.
REJECTED_BY If the mandate has been rejected, then who has rejected it.
ORDERID Order Id of mandate creation Request.
PAYMENTMODE The payment mode used for transaction.
MANDATE_TYPE Type of Mandate.
MERCHANT_CUST_ID Customer Id of user provided by Merchant.
IS_ACCEPTED Mandate Request accepted or not.
MID Merchant unique identifier, Unique Id for merchant provided by Paytm.
RESPMSG Description message is linked with each respcode.
STATUS This contains the transaction status - (TXN_SUCCESS, TXN_FAILURE).
RESPCODE Codes refer to a particular reason of payment failure/success.
SUBS_ID SubscriptionId created for this mandate.
TXNDATE Mandate Creation date/ date on which transaction has been done.
CHECKSUMHASH checksum hash of the parameters present.

Paper Mandate

Name Description
ORDERID Order Id of mandate creation request.
PAYMENTMODE Payment Mode.
MANDATE_TYPE Type Of Mandate.
MERCHANT_CUST_ID Customer Id of user provided by Merchant.
MID Merchant unique identifier, Unique Id for merchant provided by Paytm.
RESPMSG Description message is linked with each respcode.
STATUS This contains the transaction status - (TXN_SUCCESS, TXN_FAILURE).
RESPCODE Codes refer to a particular reason of payment failure/success.
SUBS_ID SubscriptionId created for this mandate.
TXNDATE Mandate Creation date/ date on which transaction has been done.
CHECKSUMHASH Checksum hash of the parameters present.
<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="UPI" />
         <input type="hidden" name="AUTH_MODE" value="USRPWD" />
         <input type="hidden" name="payerAccount" value="7777777777@paytm" />
      </form>
      <script type="text/javascript">
         document.paytm_form.submit();
      </script>
   </body>
</html>

Response Attributes

UPI Collect

Name Description
ORDERID Order Id of Subscription creation Request.
MID Merchant unique identifier, Unique Id for merchant provided by Paytm.
TXNID Paytm Transaction Id.
TXNAMOUNT Order value of the transaction in INR.
PAYMENTMODE Mode of Payment (UPI).
CURRENCY Currency of Transaction Amount.
TXNDATE Subscription Creation Date.
STATUS This contains the transaction status - (TXN_SUCCESS, PENDING, TXN_FAILURE).
RESPCODE Codes refer to a particular reason of payment failure/success.
RESPMSG Description message is linked with each respcode.
GATEWAYNAME Gateway Name used by Paytm.
BANKTXNID The transaction Id sent by the bank/wallet (NULL or empty string if the transaction doesn't reaches to the bank).
SUBS_ID Subscription Id (valid incase of subscription).
BANKNAME Name of issuing bank of the payment instrument used by customer.
CHECKSUMHASH Security parameter to avoid tampering. Verified using server side checksum utility provided by Paytm.
curl -X POST 'https://securegw-stage.paytm.in/order/pay?mid=INTEGR776XXXXXX29383&orderId=ORDR_20200429190414"' \
--header 'Content-Type: application/json' \
--data '{"body":{"orderId":"ORDR_20200429190414","paymentMode":"UPI_INTENT","mid":"INTEGR776XXXXXX29383","authMode":"USRPWD","requestType":"NATIVE"},"head":{"txnToken":"b5da4546a065409292eec31de56ca17c1588167265733"}}'

Response Attributes

UPI Intent

Name Description
ORDERID Order Id of Subscription creation Request.
MID Merchant unique identifier, Unique Id for merchant provided by Paytm.
TXNID Paytm Transaction Id.
TXNAMOUNT Order value of the transaction in INR.
PAYMENTMODE Mode of Payment (UPI).
CURRENCY Currency of Transaction Amount.
TXNDATE Subscription Creation Date.
STATUS This contains the transaction status - (TXN_SUCCESS, PENDING, TXN_FAILURE).
RESPCODE Codes refer to a particular reason of payment failure/success.
RESPMSG Description message is linked with each respcode.
GATEWAYNAME Gateway Name used by Paytm.
BANKTXNID The transaction Id sent by the bank/wallet (NULL or empty string if the transaction doesn't reaches to the bank).
SUBS_ID Subscription Id (valid incase of subscription).
BANKNAME Name of issuing bank of the payment instrument used by customer.
CHECKSUMHASH Security parameter to avoid tampering. Verified using server side checksum utility provided by Paytm.

Response Codes and Messages

respCode status respMessage
1 SUCCESS Transaction Successful.
141 FAILURE Transaction cancelled by customer after landing on Payment Gateway Page.
227 FAILURE Payment Failed due to a Bank Failure. Please try after some time.
507 FAILURE When user's account number provided by merchant doesn't match with the one used for payment(Account Number Mismatch).
508 FAILURE When account Details of the User could not be fetch.(Account Not Exists) (In case of Paytm Payments Bank only).
810 FAILURE Page closed by customer after landing on Payment Gateway Page.
8102 FAILURE Transaction cancelled by customer post login. Customer had sufficient Wallet balance for completing transaction.
8103 FAILURE Transaction cancelled by customer post login. Customer had in-sufficient Wallet balance for completing transaction.
0001 FAILURE Depending upon the use case the result message could be one from the following list:
  • Invalid Subscription Id for the session.
  • Transaction amount cannot be greater than the max amount set against the subscription
  • Transaction amount is not equal to the max amount set against the subscription