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

PARAMETERDESCRIPTIONMANDATORY
clientId String (3)ClientId by which key checksum is created, required to validate the checksum. Eg C11YES
version String (4)Version of the API. Current version is v1YES
requestTimestamp String (15)UNIX timestamp of the time request is being sentYES
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

PARAMETERDESCRIPTION
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 Json objectTransaction amount and the currency typeYes
subscriptionId String (64)Unique subscription id generated by Paytm provided in subscription creation processYes
additionalInfo Json objectAdditionalInfo for future perspective.No

Amount Attributes

PARAMETERDESCRIPTIONMANDATORY
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:

API Content format: JSON

Head

PARAMETERDESCRIPTION
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

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

Result JSON Object

PARAMETERDESCRIPTION
resultCode String (5)Result code for each result
resultStatus String (10)Status of API call (Success/Failure)
resultMsg String (256)Message contain the information about the result

Renew Subscription Response Codes, Messages and Status

CODEMESSAGESTATUS
900Subscription Txn accepted.Success
930Unable to process Subscription Request.Fail
931Subscription already in progress.Fail
110Validation failedFail
919Merchant Not FoundFail
929Invalid Subscription Details.Fail
901Subscription not available.Fail
928Subscription Renewal Rejected.Fail
935Subscription has been already cancelled.Fail
910Subscription is not configured for the merchant.Fail

Endpoints

Staging: https://securegw-stage.paytm.in/subscription/renew?mid=<mid>&orderId=<orderId>

Production: https://securegw.paytm.in/subscription/renew?mid=<mid>&orderId=<orderId>

Request CodeResponse JSON
curl -X POST 'https://securegw-stage.paytm.in/subscription/renew?mid=xxxxxxxxxxxxxxxxxxxx&orderId=ORDER_1555400657' --header 'Content-Type: application/json' --data '{"body":{"mid":"xxxxxxxxxxxxxxxxxxxx","orderId":"xxxxxxxxxxxxxxxx","subscriptionId":"xxxxx","txnAmount":{"value":"100.00","currency":"INR"}},"head":{"clientId":"C11","version":"v1","requestTimestamp":xxxxxxxxxx,"signature":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx="}}'