• Callback Response
  • Getting Started
    • Mobile Integration (Android/IOS)
      Enterprise Solutions
      Retail Solutions
      Accept Payments
      Process Payments
      Disbursals
      API References
      Refunds
      Guides
      Other links
      Mini Program Platform
  • Features for Investments PG
  • post Pre-Auth API

    Use Case


    Flow ensures a fixed amount being Pre Auth'ed or blocked from user's wallet, rendered unusable on other merchants till a capture/release or timeout.
    • In case if PAYTM returns insufficient balance in preauth response (status code WM_1006) then merchant needs to retry the preauth with new order id.preauth id of pre-auth API can be of upto 64 digits.
    • In case when Preauth API is returning error code SR_1004, merchant needs to call Transaction Status API to know the exact status of order whether txn is success or failure

    Request Attributes


    API Content Type: JSON

    ATTRIBUTE DESCRIPTION
    MID string(20)
    mandatory
    This is a unique identifier provided to every merchant by Paytm. MID is part of your account credentials and is different on staging and production environment. Your staging MID is available here & production MID will be available once your activation is complete.
    ORDER_ID string(50)
    mandatory
    Unique reference ID for an Order request which is generated by merchant and sent in the transaction request payload. Duplicate order request are rejected by Paytm. It's alphanumeric and special character allowed are “@” “-” “_” “.”.
    TXN_AMOUNT mandatory This is the PreAuth Amount that is to be charged
    TOKEN mandatory This is a unique token linked with user's Paytm wallet and is provided in the response while linking user's Paytm wallet.
    DURATIONHRS optional This is duration for which merchant wants Paytm to block the amount
    CHECKSUM string(108)
    mandatory
    Signature encryption for validation. It's value to be sent should be the checksum string created by using Paytm checksum library.
    Note: Create the signature using all the request parameters.

    Response Attributes


    API Content Type: JSON

    ATTRIBUTE DESCRIPTION
    ORDER_IDstring(50) Unique reference ID for an Order request which is generated by merchant and sent in the transaction request payload. Duplicate order request are rejected by Paytm. It's alphanumeric and special character allowed are “@” “-” “_” “.”.
    BLOCKEDAMOUNT This is the amount that the Merchant raised a block request for
    PREAUTH_ID This is a unique ID generated by Paytm(acquirementId) against each Pre-auth Request
    STATUSCODEstring This is corresponding to a particular message and is returned to the merchant. It's maximum length is 64. The different result codes corresponding to this API are mentioned below.
    STATUSMESSAGEstring(30) This parameter is the result message which contains information about the result.
    STATUSstring(20) This parameter indicates the status of API call.
    USER_WALLET_BALANCE This field contains user wallet balance after preauth txn


    Response Codes and Messages


    Pre-Auth Status Codes and Messages

    STATUSCODESTATUSSTATUSMESSAGE
    01TXN_SUCCESSTxn Successful
    100TXN_FAILUREPaytm has classified this transaction as suspicious
    118TXN_FAILUREThe transaction amount specified by the user exceeds the per transaction limit for this merchant
    130TXN_FAILUREThis user is blocked at Paytm end
    151TXN_FAILURETransaction with the same order Id already exists
    156TXN_FAILUREPerday Txn amount is crossed for Paytm
    158TXN_FAILUREPerMonth Txn amount is crossed for Paytm
    159TXN_FAILUREPerday Txn count is crossed for Paytm
    161TXN_FAILUREPerMonth Txn count is crossed for Paytm
    165TXN_FAILUREUser has crossed the monthly debit limit prescribed by RBI
    227TXN_FAILURETransaction failed
    237TXN_FAILURECould not complete request. Please retry again
    240TXN_FAILUREInvalid total amount
    238TXN_FAILUREInvalid currency code
    243TXN_FAILUREWallet not exist for the user
    267TXN_FAILUREUser does not exist
    274TXN_FAILUREUser not verified
    327TXN_FAILUREChannel is not associated
    303TXN_FAILUREMerchant Id can not be blank
    334TXN_FAILUREInvalid Order Id
    343TXN_FAILUREInvalid Token
    344TXN_FAILUREInvalid wallet type
    345TXN_FAILURERequest not unique
    350TXN_FAILUREDuplicate order id
    357TXN_FAILUREInvalid order Id
    403TXN_FAILUREUNAUTHORIZED_ACCESS
    501TXN_FAILURESystem Error
    SR_1004TXN_FAILUREDuplicate block request for Merchant Order ID
    GE_1007TXN_FAILUREInvalid Transaction Amount
    WM_1006TXN_FAILUREYour balance is insufficient for this request. Please add money in your wallet before proceeding
    RWL_2001TXN_FAILUREYou cannot do txns of amount greater than the allowed debit limit on your wallet.
    UDL_0015TXN_FAILUREDaily limit for number of Payment to Merchant transactions will exceed. Please update limits and retry
    UDL_0014TXN_FAILUREDaily limit for total amount of Payment to Merchant transactions will exceed. Please update limits and retry
    UDL_0017TXN_FAILUREMonthly limit for number of Payment to Merchant transactions will exceed. Please update limits and retry
    UDL_0016TXN_FAILUREMonthly limit for total amount of Payment to Merchant transactions will exceed. Please update limits and retry
    ATE_00042TXN_FAILUREBalance Account not found
    WM_1003TXN_FAILUREMerchant does not exist
    P2P_1000We could not get the requested details. Please try againTXN_FAILURE
    RWL_0001TXN_FAILUREYou will exceed maximum number of allowed transactions
    GE_1026TXN_FAILUREWe can not process your request. Please try later
    GE_1041TXN_FAILUREWe could not get the requested details. Please try again
    GE_1035TXN_FAILUREMerchant is in inactive state
    VF_1009TXN_FAILURECould not pass velocity check
    GE_1073TXN_FAILUREPreAuth limit exceeded. You cannot block more amount for this user

    Pre-Auth Error Codes and Error Messages


    ErrorCodeErrorMessage
    240Invalid total amount
    305Merchant Id not registered
    330Paytm checksum mismatch
    332Order id can't be greater than 50 characters
    501System Error
    NO TOKENTOKEN IS REQUIRED
    ORDER_ID NOT PRESENTORDER_ID IS REQUIRED
    TXN_AMOUNT IS NOT PRESENTTXN_AMOUNT IS REQUIRED
    VAER-CS103CHECKSUM IS REQUIRED
    VAER-PF101VAL_PF_MID IS REQUIRED
    StagingProduction
    REQUESTRESPONSE
    curl -X POST 'https://securegw-stage.paytm.in/order/preAuth' \
    --header 'Content-Type: application/json' \
    --data '{"MID":"{mid}","ORDER_ID":"ORDERID_98765","TXN_AMOUNT":"1.00","TOKEN":"eyJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0..xxxxxxxxxxx.9iHTtWbCZ0I6qbn2sUnyz5siw1fqbmtEnFMFE7nSIX-yrwCkiGfAC6QmPr9q-tw8LMPOh5-3UXRbpeVZEupQd3wNyaArWybRX2HAxJDRD8mxJ_wxzJM6GZ1ov4O3EIsx2Y_Zr0aHCd3VbnTjRUnlVdxXJPFG8QZs0b_2TVdoAX3_QjZS8_dwcmIWoH8ebDzOIs7MJacETfMtyFGAo8Xc0LjznToUWvTsTbIXQoF1yB0.1fZFAYJVsY61BTv2htLcXQ8800","CHECKSUM":"{checksum}"}'