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

      Process Transaction API

      Checksum required: No

      Use Case


      It is used to process the transaction with respect to paymentMode provided by merchant in the request. We either return bank form for paymentMode like NET_BANKING, CREDIT_CARD, DEBIT_CARD or provide the result of payment in case of paymentMode like BALANCE, PAYTM_DIGITAL_CREDIT etc.

      Request Attributes

      API Content format: JSON

      Head

      ATTRIBUTEDESCRIPTIONMANDATORY
      version StringVersion of the API. Current version is v1.No
      requestTimestamp StringUNIX timestamp of the time request is being sentNo
      channelId StringChannel from where the API call is initiated.
      WEB: for the web server
      WAP: for the mobile device
      Yes
      txnToken StringIt is the security token generated by Initiate Transaction API for a transaction.
      It is valid for 15 minutes.
      Yes

      Body

      ATTRIBUTEDESCRIPTIONMANDATORY
      mid StringMerchant unique identifier, Unique Id for merchant provided by paytm.Yes
      orderId String (32)Unique ID for each order request. Paytm will reject the duplicate order request . No special character allowed except (“-”,”_”)Yes
      paymentMode StringThe payment mode used by customer for transaction. Possible values are:
      CREDIT_CARD, DEBIT_CARD, NET_BANKING, BALANCE, UPI, UPI_INTENT, EMI

      For Intelligent Router, possible values are:
      CREDIT_CARD, DEBIT_CARD, NET_BANKING, UPI, WALLET
      Yes
      cardInfo StringIt contains the details of saved and new card in the format:
      cardInfo: saveCardId|cardNo|cvv|expDate
      1. saveCardId : unique saved card id for each saved card (required in case of saved card)
      2. cardno: users credit/debit card No (required in case of new card)
      3. cvv: cvv No of user credit/debit card
      4. expDate: expiry date of users credit/debit card (required in case of new card)
      No
      authModeString (pin, otp)Authentication mode for Cards.
      Inputs could be: otp/pin
      No
      channelCodeStringBankCode (only in NET_BANKING) Inputs could be: SBI, ICICI , PNB , HDFC etcNo
      paymentFlow Stringin case of AddAndPay and Hybrid transaction Inputs could be : HYBRID, ADDANDPAYNo
      payerAccountStringVPA, this is needed for UPI transaction.No
      planIdStringThis is the plan chosen for EMI, Input could be : BankCode|MonthNo
      storeInstrument StringPossible Values: 0 or 1
      1 if you want to store user instrument
      0 if you don't want to store user instrument.
      No
      requestTypeStringRequest typeYes
      walletTypeStringOnly required for Intelligent Router when paymentMode is WALLET. Possible values: PAYTMPGNo

      Example of sample inputs based on different paymentMode

      1. Card transaction (without saved card):
        paymentMode: DEBIT_CARD ( CREDIT_CARD or DEBIT_CARD as per the card )
        cardInfo: |4111111111111111|123|092017
        storeInstrument: 1

      2. Card transaction (with saved card):
        paymentMode: CREDIT_CARD (CREDIT_CARD or DEBIT_CARD as per the card )
        cardInfo: 123456||123|

      3. Card transaction (with auth mode option):
        paymentMode: DEBIT_CARD (CREDIT_CARD or DEBIT_CARD as per the card )
        cardInfo: |4111111111111111|123|092017
        storeInstrument: 1
        authMode: atm (atm and otp in case of user selected option)

      4. Net banking transaction:
        paymentMode: NET_BANKING
        channelCode : ICICI

      5. Paytm wallet transaction:
        paymentMode: BALANCE

        For intelligent router, please use below:
        paymentMode: WALLET
        walletType: PAYTMPG

      6. UPI Payment Transaction:
        paymentMode: UPI
        channelCode : collect
        payerAccount: abcdefgh@paytm

      7. Paytm Payments Bank
        paymentMode: PPBL

      8. Add and Pay with Cards
        paymentMode: DEBIT_CARD (CREDIT_CARD or DEBIT_CARD as per the card )
        cardInfo: |4111111111111111|123|092017
        paymentFlow: ADDANDPAY

      Response Attributes

      Head

      ATTRIBUTEDESCRIPTIONMANDATORY
      version StringVersion of the API passed in the request.No
      requestTimestamp StringUNIX timestamp of the time request is being sentNo

      Body

      ATTRIBUTEDESCRIPTIONMANDATORY
      resultInfoResultInfoResult info of the API requestYes
      txnInfo TxnInfoTransaction related information such as amount, status etc.No
      callBackUrl StringcallBackUrl of MerchantNo
      bankForm BankFormBankForm Details returned in case of following paymentModes:
      CREDIT_CARD, DEBIT_CARD, NET_BANKING, EMI, UPI
      No

      BankForm

      ATTRIBUTEDESCRIPTIONMANDATORY
      pageTypeStringPossible values : "redirect","direct".
      "direct" only for cases of Direct banks of CC/DC/EMI and when merchant supports Native OTP else "redirect"
      Yes
      redirectForm FormDetailContains Bank URL , Http method , headers and content to be used by merchant to open bankForm.Yes
      directForms FormDetail ArrayContains APIs (URLs, Header, Payload) to be used on merchant owned Bank PageNo
      displayField Map <String,String>Contains field like Amount, Bank Name, URL for bank logo etc. which can be used for display purposeNo

      FormDetail

      ATTRIBUTEDESCRIPTIONMANDATORY
      actionURL StringURL that merchant needs to callYes
      method Stringhttp method to be used by merchant to call the above URLYes
      type StringType could be redirect in case of BankForm and submit,resend,cancel,payonbank for DirectBank Form depending on the merchantPreference and bankYes
      headers Map<String, String>http headers to be used when calling actionURLNo
      content Map<String, String>Map of data that needs to be provided in the request body when calling actionURLNo

      TxnInfo

      ATTRIBUTEDESCRIPTIONMANDATORY
      MID String(20)This is a unique identifier provided to every merchant by PaytmNo
      TXNID String(64)This is a unique Paytm transaction ID that is issued by Paytm for each transactionNo
      ORDERID String(50)Unique reference ID for a transaction which is generated by merchant and sent in the requestNo
      BANKTXNID StringThe transaction ID sent by the bank. In case of Paytm proprietary instruments too, there is unique reference number generated by Paytm's system. In case the transaction does not reach the bank, this will be NULL or empty string. Primary reason for this is user dropping out of the payment flow before the transaction reaches to bank serversNo
      TXNAMOUNT String(10)Amount to be paid by customer in INRNo
      CURRENCY String(3)Currency in which the transaction has taken place. Currently only "INR" is the supported currency of transactionNo
      STATUS String(20)This contains the transaction status and has only three values: TXN_SUCCESS, TXN_FAILURE and PENDINGNo
      RESPCODE String(10)Codes refer to a particular reason of payment failure/success. List in this PDFNo
      RESPMSG String(500)Description message is linked with each respcode. List in this PDFNo
      TXNDATE DateTimeDate and Time of transaction in the format "yyyy-MM-dd HH:mm:ss.S"Example: "2015-11- 02 11:40:46.0"No
      GATEWAYNAME String(15)Gateway used by Paytm to process the transactions. By paymodes, the details are provided below
      Credit, Debit cards, UPI - Gateway used to process the transaction. For example, if HDFC gateway has been used to process SBI credit card transactions, the value will be HDFC
      Net banking - Netbanking transactions are not routed via gateway. Hence issuing bank name is passed in this field
      Paytm Wallet - The value will be 'WALLET'
      Paytm Postpaid - The value will be 'PAYTMCC'
      No
      PAYMENTMODE String(15)he payment mode used by customer for transaction. Possible values are:
      CREDIT_CARD, DEBIT_CARD, NET_BANKING, BALANCE, UPI, UPI_INTENT, EMI

      For Intelligent Router, possible values are:
      CREDIT_CARD, DEBIT_CARD, NET_BANKING, UPI, WALLET
      No
      CHECKSUMHASH String(108)Security parameter to avoid tampering. Verified using server side checksum utility provided by Paytm. Utilities to generate checksumhash is available hereNo
      VPA StringVirtual payment address (VPA) . It is an identifier that is uniquely mapped to an individual bank account.No

      ResultInfo

      ATTRIBUTEDESCRIPTIONMANDATORY
      resultCodeStringResult code returned to merchant . Max length of result code can be 64Yes
      resultStatusStringStatus of API call
      (S:Success, F:Failure, U:Unknown)
      Yes
      resultMsgString (256)Result Message contains information about the result.Yes
      retry booleanFlag indicating if retry of payment is allowed on the transaction in case of payment failuresNo

      Response Codes and Messages

      resultCoderesultStatusresultMsg
      0000SSuccess
      0001FFAILED
      1001FRequest parameters are not valid
      1006FSession Expired Exception
      1007FMissing mandatory element

      Endpoints

      Staging: https://securegw-stage.paytm.in/theia/api/v1/processTransaction?mid={mid}&orderId={order-id}

      Production: https://securegw.paytm.in/theia/api/v1/processTransaction?mid={mid}&orderId={order-id}

      Request CodeResponse JSON
      curl -X POST 'https://securegw-stage.paytm.in/theia/api/v1/processTransaction?mid={mid}&orderId={order-id}' --header 'Content-Type: application/json' --data '{"head":{"txnToken":"{transaction-token}"},"body":{"requestType":"NATIVE","mid":"{mid}","orderId":"{order-id}","paymentMode":"{payment-mode}","authMode":"{auth-mode}","cardInfo":"{card-info}"}}'