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

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