• 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 Subscription PreNotify API

    Use Case


    This is an asynchronous API to pre-notify user about the debit of the subscription.
    Also, when successful notification has been sent to the user, a callback would be there to notify the same to the merchant as well.

    Request Attributes


    API Content Type: JSON

    Head1

    Head

    ATTRIBUTEDESCRIPTION
    clientId string(3)
    optional
    Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key.
    Example: C11
    tokenType AES
    mandatory
    This parameter identifies whether the API works on checksum authentication. The value to be sent in tokenType is 'AES' for this API.
    signature string(108)
    mandatory
    Paytm validates the request and ensures that parameters are not tempered by verifying the signature in the request. For creating the checksum (signature) refer to the steps given in Checksum logic.
    Note: Create the signature using the body parameter of the request.
    timestamp string(15)
    optional
    EPOCH timestamp of the time at which request is being sent.
    Body1

    Body

    ATTRIBUTEDESCRIPTION
    mid string
    mandatory
    Paytm provides MID as a unique identifier to each merchant.
    Example: INTEGR7769XXXXXX93833
    subsId string
    mandatory
    Subscription ID - Only Subscription flow
    txnAmount string(10)
    mandatory
    Order value of the transaction in INR.
    Example: 1.00
    txnDate string
    mandatory
    date on which debit is intended to happen
    Format DD-MM-YYYY
    Example: 2020-05-05 14:00:28
    txnMessage string
    mandatory
    reason for debit, length <= 200
    referenceId string
    mandatory
    unique reference number, Length <= 32
    Either referenceId or paytmReferenceId is Mandatory

    Response Attributes


    API Content Type: JSON

    Head2

    Head

    ATTRIBUTEDESCRIPTION
    clientId string(3)
    Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key.
    Example: C11
    version string(2)
    Version of the API passed in the request.
    Example: v1
    timestamp string(15)
    EPOCH timestamp of the time at which response is being sent.
    Body2

    Body

    ATTRIBUTEDESCRIPTION
    resultInfo object
    This parameter gives the information about the result of the API response
    ResultInfo +
    AttributeDescription
    code string
    This is the result code 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
    status string
    This parameter indicates the status of API call.
    Possible Values: SUCCESS, FAILURE
    message string(256)
    This parameter is the result message which contains information about the result.The different result messages corresponding to this API are mentioned below
    paytmReferenceId string
    reference id

    Response Codes and Messages


    codestatusmessage
    3006SUCCESSSUCCESS
    400FAILUREThe request cannot be validated. Please refer to the doc and try again.
    401FAILUREAuthentication Failure.
    500FAILURESystem Error
    3000FAILUREMERCHANT_NOT_FOUND
    3004FAILURESubscription Not Found.
    3005FAILURESome error occured.
    3008FAILUREInvalid Subscription Amount
    3046FAILURENotification has already been sent.
    3047FAILUREInvalid Debit Date.
    3049FAILUREDuplicate Reference Id.
    StagingProduction
    REQUESTRESPONSE
    curl -X POST 'https://securegw-stage.paytm.in/subscription/preNotify' -H 'Content-Type: application/json' --data-raw '{"head":
    {"signature" : "aesdg123456789jhdfgrtyuaaaa=","tokenType" : "AES" },"body":{"subsId" : 7271,"mid" : "{mid}","txnAmount":2000,"txnDate":"06-07-2020","txnMessage" :"NspPa6464ndCre985T55908504960" ,"referenceId" : "NspPa6464ndCre985T5998985456"}}'