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

      post Renew Subscription API

      Use Case


      • To request renewal transactions for an ongoing subscription. Renewal transactions are requested with subscription ID provided at the time of creation of subscription
      • In case the renewal transaction gets failed from the bank and retry is set on the subscription, retry can also be initiated using this API
      Note:
      • The success of this API suggests that Paytm has accepted the renewal transaction post completion of validations against the created subscription (plan details). This does not mean that money has been deducted from customers account. Once accepted, we initiate the renewal against the set payment instrument. Upon completion, the same is notified to you on your callback URL
      • Renewal transactions cannot be initiated against expired or cancelled subscriptions
      • Only one renewal can be initiated for a subscription in a renewal cycle

      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
      version string(4)
      optional
      Version of the API.
      Example: v1
      requestTimestamp string(15)
      optional
      EPOCH timestamp of the time at which request is being sent.
      Example: 1588402269
      channelId string(3)
      optional
      The parameter value identifies the Channel for which API call is initiated.
      Possible Values: WEBFor websites, the value to be passed should be "WEB", WAPFor Mobile websites/App, the value to be passed should be "WAP"
      signature string(108)
      mandatory
      Paytm validates the parameter values by verifying the signature comes in the request. It ensures that parameter values are not tempered. Signature string can be created by using Paytm checksum library
      Body1

      Body

      ATTRIBUTEDESCRIPTION
      mid string(20)
      mandatory
      Paytm provides MID as a unique identifier to each merchant. For your staging MID, click here. You get the production MID post the account activation.
      Example: INTEGR7769XXXXXX9383
      orderId string(50)
      mandatory
      The Unique reference ID of the Order. It is alphanumeric and special characters allowed are “@” “-” “_” “.”.
      Example: OREDRID_98765
      txnAmount object
      mandatory
      This parameter is an object and should contain the value of transaction i.e. amount and currency type
      Example: {"value" : "1.00", "currency" : "INR"}
      TxnAmount +
      AttributeDescription
      value string
      mandatory
      This parameter contains the amount to be charged to the customer and can have two places of decimal.
      Example: 1.00
      currency string(INR)
      mandatory
      This parameter indicates the currency in which transaction amount is to be deducted.
      Possible Values: INR
      subscriptionId string(64)
      mandatory
      Unique subscription id generated by Paytm for identifying a subscription.
      debitDate string
      mandatory
      Date of debit. Format: YYYY-MM-DD HH:mm:ss
      Example: 2020-04-20 00:00:00

      Response Attributes


      API Content Type: JSON

      Head2

      Head

      ATTRIBUTEDESCRIPTION
      version string(2)
      Version of the API passed in the request.
      Example: v1
      responseTimestamp string(15)
      EPOCH timestamp of the time at which response is being sent.
      Example: 1588402269
      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
      signature string(108)
      Paytm validates the parameter values by verifying the signature comes in the request. It ensures that parameter values are not tempered. Signature string can be created by using Paytm checksum library
      Body2

      Body

      ATTRIBUTEDESCRIPTION
      resultInfo object
      This parameter gives the information about the result of the API response
      ResultInfo +
      AttributeDescription
      resultCode string
      This is the resultCode 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.
      resultStatus string
      This parameter indicates the status of API call.
      Possible Values: SUCCESS, FAILED
      resultMessage 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
      txnId string(64)
      This is a unique Paytm transaction ID that is issued by Paytm for each transaction

      Response Codes and Messages


      resultCoderesultStatusresultMsg
      900SSubscription Txn accepted.
      156FPer day Txn amount is crossed for Paytm
      158FPer Month Txn amount is crossed for Paytm
      165FUser has crossed the monthly debit limit prescribed by RBI
      196FPayment failed as amount entered exceeds the allowed limit. Please enter a lower amount and try again or reach out to the merchant for further assistance
      202FYour payment is declined by the bank due to insufficent funds in your account. Please try again by using a different method to complete the payment.
      227FYour payment has failed due to a technical error. Please try again or use a different method to complete the payment.
      313FInvalid SavedCardID
      325FDuplicate Order Id
      501FSystem Error
      505FPlease try with lower amount or different payment mode. Transaction limits will revise as you continue using Paytm.
      901FSubscription not available
      905FInvalid Transaction Amount
      910FSubscription is not configured for the merchant.
      913FInvalid subscription amount type.
      919FMerchant Not Found
      924FWallet balance Insufficient
      928FSubscription Renewal Rejected.
      929FInvalid Subscription Details.
      931FSubscription already in progress.
      935FSubscription has been already cancelled.
      945FManual renewal is not allowed as subscription has auto renewal preference configured.
      947FManual retry is not allowed on subscription where autorenewal or auto retry is configured.
      1102FSomething wents down, We are fixing the same
      1103FThe Debit Date is invalid
      1104FRenewal request is already pending in this frequency cycle
      1105FThe Debit Date is beyond Subscription End Date
      1106FDebit on a later date functionality not available for the the paymode linked to your subscription
      StagingProduction
      REQUESTRESPONSE
      curl -X POST 'https://securegw-stage.paytm.in/subscription/renew?mid={mid}&orderId=ORDERID_98765' \
      --header 'Content-Type: application/json' \
      --data '{"body":{"mid":"{mid}","orderId":"ORDERID_98765","subscriptionId":"67491","txnAmount":{"value":"1.00","currency":"INR"}},"head":{"signature":"{signature}"}}'