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

      Auto Debit API

      Checksum required: YES

      Use Case


      This API is used to debit the amount from the Paytm proprietary instrument, provided the sso token is valid and the user has sufficient balance in his Paytm account


      Request Attributes

      API Content format: JSON

      PARAMETERDESCRIPTIONREQUIRED
      MID String(20 char)Merchant unique Identifier provided by PaytmYes
      ReqType StringValue is always “WITHDRAW”Yes
      TxnAmount Float(2 decimal)Transaction amount, total amount including subwallet amountsYes
      AppIP String
      127.0.0.1
      Ip of the device by which call is initiatedYes
      OrderId String(50 char)
      Alphanumeric no special character except “-”,”_”,”@”
      Unique identification order id (this value must be unique for every request)Yes
      DeviceId StringUnique identification no of the Device like customer's phone numberYes
      Currency INRCurrency in which transaction in initiated by defaultYes
      SSOToken GUIDPaytm user SSO_TOKEN for the identification of user
      PaymentMode StringThe payment mode used for transaction. PPI for Wallet txn.
      Value is always PPI in case of deduct from wallet
      Yes
      CustId String(50 char)Unique customer identification no for merchant userYes
      IndustryType String(16 char)Industry type is provided by PaytmYes
      Channel StringChannel by which transaction is initiated
      WEB or WAP
      Yes
      AuthMode StringUSRPWD – for Net banking/Wallet payment mode.Yes
      CheckSum String(256 char)CheckSum generated as per some logic by Paytm. This needs to be verified by the merchant.Yes
      MercUnqRef String(128 char)
      alphanumeric no special character except “-”,”_”,”@”
      User defined parameterNo
      PROMO_CAMP_ID StringThis parameter is required to pass when merchant is running any promotional campaign and it is configured at paytm payment gateway.Merchant will get in contact with Paytm to launch any promocode campaignNo
      subwalletAmount Map<UserSubWalletType, BigDecimal>
      "subwalletAmount": {"FOOD": "2"}
      Possible keys: FOOD, GIFT, MULTI_PURPOSE_GIF,TOLL, FUEL, CASHBACK, GIFT_VOUCHER
      This parameter is required to limit the maximum amount that could be deducted from a particular subwallet.No

      NOTE :

      Exclude parameter subwalletAmount and checkSum while creating checksum for the request.

      Response Attributes

      PARAMETERDESCRIPTION
      TxnId Numeric (Length: 64 digit, Datatype: long)A unique ID generated by Paytm for each txn.
      MIDThis is a unique “Merchant Identifier” that is issued by Paytm to the Merchant
      OrderIdThe “Order ID” is the Merchant’s Transaction ID which should be unique for every transaction. Duplicate order id will be rejected by the Paytm gateway.
      TxnAmount NumericThe amount that the Merchant needs to withdraw.
      BankTxnId Numeric(eg, 01)A unique ID generated for each txn by the Paytm Wallet
      ResponseCodeA numeric description of the status of the txn
      ResponseMessage Character(eg, Txn Successful)A description of the status of the txn
      Status Character
      (eg,TXN_SUCCESS)
      The current status of the txn. TXN_SUCCESS/TXN_FAILURE
      PaymentMode Character(eg, PPI)The PaymentMode that was used for this txn
      PROMO_CAMP_ID AlphaNumericThis parameter will come in response only if merchant is running any promotional campaign and have passed the required parameters in transaction request. Promo should be configured at Paytm payment gateway.Optional if merchant has not requested for any promo campaign.
      PROMO_STATUS AlphaNumericThis paremeter will indicate if Promo is successfully applied or failed. Below are values which may return in this parameter. PROMO_SUCCESS,PROMO_FAILURE.
      Optional (if merchant has not requested for any promo campaign)
      PROMO_RESPCODE AlphaNumericThis is a numeric response code. “01” implies promo applied successfully. All other codes refer that promo code has not been applied. Each code representing a different reason for failures. Optional if merchant has not requested for any promo campaign.
      CheckSum AlphaNumericCheckSum generated as per some logic by Paytm. This needs to be verified by the merchant.
      MercUnqRef AlphaNumericIf merchant send the parameter request then need to return the same value in response
      BankName Character(eg, Wallet)The bank that was used for this txn
      CustId AlphaNumericThe unique ID of each customer that was received from the Merchant
      MBID AlphaNumericA unique ID generated by the bank for each merchant.
      StatusCode Stringstatus of the Txn; not mandatorarily present all the time.

      Response Codes and Messages

      01Txn Successful.
      118The transaction amount specified by the user exceeds the per transaction limit for this merchant.
      130This user is blocked at Paytm end
      151Transaction with the same order Id already exists
      227Transaction failed
      235You don't have sufficient balance in your account. Please try with a different account.
      237Could not complete request. Please retry again.
      239Merchant does not exist
      240Invalid total amount
      243Wallet not exist for the user
      260Maximum allowed amount in Wallet exceeds limit
      267User does not exist
      274User not verified
      305Merchant Id not registered.
      327Channel is not associated
      330Paytm checksum mismatch
      334Invalid Order Id.
      343Invalid Token
      344Invalid wallet type
      345Request not unique
      350Duplicate order id
      501System Error
      712Applying Promo Code Failed

      Endpoints

      Staging: https://securegw-stage.paytm.in/order/directPay

      Production: https://securegw.paytm.in/order/directPay

      Request CodeResponse JSON
      curl -X POST 'https://securegw-stage.paytm.in/order/directPay' --header 'Content-Type: application/json' --data '{"ReqType":"WITHDRAW","SSOToken":"{paytm-user-token}","MID":"{mid}","TxnAmount":"{transaction-amount}","AppIP":"{client-ip}","OrderId":"{order-id}","Currency":"{transaction-currency}","DeviceId":"{mobile-number}","PaymentMode":"{payment-mode}","CustId":"{customer-id}","IndustryType":"{industry-type}","Channel":"{channel-code}","AuthMode":"{authorization-mode}","CheckSum":"{checksum}"}'