POSTInitiate Renewal API
Use Case
This API is used to renew a previously created subscription transaction.
Request Attributes
Head
Attribute | Description |
---|---|
requestTimeStamp string optional | EPOCH timestamp of the time at which request is being sent. Example: 1588402269 |
signature string mandatory | AI router 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.
|
channelId string optional | The parameter value identifies the Channel for which the API call is initiated. Possible values: WEB , WAP |
Body
Attribute | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mid string mandatory | This is a unique identifier provided to every merchant by AI router. Example: 216820000002516036253 | ||||||||||||
orderId string mandatory | It is a unique reference ID for a transaction passed in the transaction request. Order ID should be passed to raise the refund Example: OREDRID_98765 | ||||||||||||
requestType string mandatory | This parameter is used to identify the transaction flow. | ||||||||||||
subscriptionId string mandatory | Unique subscription id generated by Paytm AI Router provided in subscription creation process | ||||||||||||
txnAmount Object optional | The first payment amount to be charged to the customer at the time of subscription creation. Example: {"value" : "1.00", "currency" : "INR"} | ||||||||||||
TxnAmount +
| |||||||||||||
extendInfo Object optional | Merchant can pass any order specific information that is required to be passed here | ||||||||||||
ExtendInfo +
| |||||||||||||
debitDate Date optional | Functionality to accept a future date for renewal in this param Format : yyyy-MM-dd HH:mm:ss |
Response Attributes
Head
Attribute | Description |
---|---|
responseTimeStamp string | EPOCH timestamp of the time at which response is being sent. Example: 1588402269 |
signature string | AI router 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.
|
Body
Attribute | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
resultInfo string | This parameter gives the information about the result in the API response | ||||||||
resultInfo +
| |||||||||
txnId string | This is a unique Paytm transaction ID that is issued by Paytm for each transaction | ||||||||
extraParamsMap Map | Map for any extra information (in case of error). |
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
0 | S | Success |
1007 | F | Mid is mandatory in query parameter |
2014 | F | OrderId in the query param doesn't match with the OrderId send in the request |
2013 | F | Mid in the query param doesn't match with the Mid send in the request |
501 | F | Internal System error |
500 | F | System Error |
919 | F | Merchant Not Found |
929 | F | Invalid Subscription Details |
1104 | F | Validation failed |
1102 | F | Something went down. Please retry again |
931 | F | Payment request is already pending in this frequency cycle |
928 | F | Retry count for payment request in this cycle has been exhausted |
935 | F | Subscription has been already cancelled |
3004 | F | Subscription Not Found |
1104 | F | The subscription has already expired |
1104 | F | Duplicate Order Id |
1104 | F | This subscription is suspended |
1104 | F | Transaction amount cannot be null |
905 | F | Payment request amount does not match the Subscription contract |
913 | F | Payment request amount is not allowed as per the subscription contract |
910 | F | Subscription has been disabled for your merchant account. Please reach out to support teams to enable the same |
945 | F | Manual renewal is not allowed as subscription has auto renewal preference configured |
1104 | F | Renewal request is already pending in this frequency cycle |
1103 | F | The Debit Date is invalid |
1105 | F | The Debit Date is beyond Subscription End Date |
3054 | F | Prenotify not found for subscriptionId of this transaction date and amount |
3055 | F | The debit date does not match with the one sent in the notification request |
3057 | F | The debit amount does not match with the one sent in the notification request |
3059 | F | PreNotify is not scheduled for the payment request |
1104 | F | Payment Request date cannot be for future frequency cycles |
1104 | F | Payment Request date is not as per the subscription contract |
1104 | F | Payment request is already success in this frequency cycle |
curl --location 'https://stage-router.paytm.in/aoa-subscription/api/subscription/renew?mid=YOUR_MID_HERE&orderId=arjunrenew009' \
--header 'Cache-Control: no-cache' \
--header 'Content-Type: application/json' \
--header 'Postman-Token: e56c9dc2-ae89-405b-b48d-ec8211db2e0f' \
--data '{"head": {"clientId": "UMP","version": "v1","requestTimestamp": "1680168061929","channelId": "WEB","tokenType" : "JWT","token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXF1ZXN0VGltZXN0YW1wIjoiMTY4MDE2NDcxNDE5NCIsIm9yZGVySWQiOiJzdWJzMTU0IiwiaXNzIjoiVU1QIiwic3Vic2NyaXB0aW9uSWQiOiIxMDAwMDgwMSIsIm1pZCI6IjIxNjgyMDAwMDAwMjUxNjAzNjI1MyJ9.WXewioZpgzIs0s-Ai93wf3qNhmwmtlIvUaPtPeGx86A"},"body": {"mid": "YOUR_MID_HERE","orderId": "arjunrenew009","txnAmount": {"value": "1","currency": "INR"},"subscriptionId": "10001457","extendInfo": {"udf1": "123","udf2": "23","udf3": "345","mercUnqRef": "123","comments": ""}}}'