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

      Renew Subscription API

      Checksum required: Yes

      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 format: JSON

      Head

      ATTRIBUTEDESCRIPTIONMANDATORY
      clientId String (3)ClientId by which key checksum is created, required to validate the checksum. Eg C11No
      version String (4)Version of the API. Current version is v1.No
      requestTimestamp String (15)UNIX timestamp of the time request is being sentNo
      channelId String (3)For websites, the value is WEB. For Mobile websites/App, the value is WAPNo
      signature String (108)Checksum string created by using Paytm checksum logicYes

      Body

      ATTRIBUTEDESCRIPTIONMANDATORY
      mid String (20)This is a unique identifier provided to every merchant by PaytmYes
      orderId String (32)Unique reference ID for a transaction which is generated by merchant and sent in the requestYes
      txnAmount TxnAmountTransaction amount and the currency typeYes
      subscriptionId String (64)Unique subscription id generated by Paytm provided in subscription creation processYes

      Amount Attributes

      ATTRIBUTEDESCRIPTIONMANDATORY
      Value String (10)Amount paid by customer in INR. Transaction value to be provided in 2 decimal values 100.50Yes
      Currency String (3)Currency code (INR)Yes

      Response Attributes

      Head

      ATTRIBUTEDESCRIPTION
      Value String (10)Amount paid by customer in INR. Transaction value to be provided in 2 decimal values 100.50
      Currency String (3)Currency code (INR)
      clientId String (3)ClientId by which key checksum is created, required to validate the checksum. Eg C11
      signature String (108)Checksum string created by Paytm from response parameters

      Body

      ATTRIBUTEDESCRIPTION
      txnId String (64)This is a unique Paytm transaction ID that is issued by Paytm for each transaction
      resultInfo ResultInfoInformation related to response of the request

      ResultInfo

      ATTRIBUTEDESCRIPTIONMANDATORY
      resultCode String (5)Result code for each resultYes
      resultStatus String (10)Status of API call (Success/Failure)
      (S:Success, F:Failure, U:Unknown)
      Yes
      resultMsg String (256)Message contain the information about the resultYes

      Response Messages and Codes

      resultCoderesultStatusresultMsg
      900SSubscription Txn accepted.
      110FValidation failed
      501FSystem Error
      930FUnable to process Subscription Request.
      931FSubscription already in progress.
      919FMerchant Not Found
      929FInvalid Subscription Details.
      901FSubscription not available.
      928FSubscription Renewal Rejected.
      935FSubscription has been already cancelled.
      910FSubscription is not configured for the merchant.

      Endpoints

      Staging: https://securegw-stage.paytm.in/subscription/renew?mid={mid}&orderId={order-id}

      Production: https://securegw.paytm.in/subscription/renew?mid={mid}&orderId={order-id}

      Request CodeResponse JSON
      curl -X POST 'https://securegw-stage.paytm.in/subscription/renew?mid={mid}&orderId={order-id}' --header 'Content-Type: application/json' --data '{"body":{"mid":"{mid}","orderId":"{order-id}","subscriptionId":"{subscription-id}","txnAmount":{"value":"{transaction-amount-value}","currency":"{transaction-amount-currency}"}},"head":{"signature":"{signature}"}}'