POSTSubscription Consult API
Use Case
To provide ability to the merchant to check whether renewal can be done for this subscription using wallet as paymode.
Request Attributes
Head
Attribute | Description |
---|---|
version string optional | Version of the API. Example: v1 |
timestamp string optional | EPOCH timestamp of the time at which request is being sent. |
tokenType string mandatory | This parameter identifies whether the API works on checksum authentication. The value to be sent in tokenType is 'AES' for this API. |
clientId string optional | Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key. |
signature string 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. |
Body
Attribute | Description |
---|---|
subsId string mandatory | Subscription id |
mid string 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 |
amount decimal mandatory | Renewal amount |
Response Attributes
Head
Attribute | Description |
---|---|
version string | Version of the API. Example: v1 |
timestamp string | EPOCH timestamp of the time at which response is being sent. |
clientId string | Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key. |
Body
Attribute | Description |
---|---|
fundsSufficient boolean | If transaction can be done via paytm without adding money. |
addMoneyAllowed boolean | If add money can be done to complete the transaction. True in case funds are not sufficient but transaction can be completed by doing add money and False in case funds are not sufficient but transaction can not be completed by doing add money null in case funds are sufficient. |
deficitAmount decimal | Amount that needs to be added for completing the transaction. |
resultInfo string | Includes status and message depicting whether the request has been successfully catered or not. |
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
3006 | S | Success |
400 | F | The request cannot be validated. Please refer to the doc and try again . |
939 | F | Given subscription is not for merchant or its aggregator. |
401 | F | Authentication Failure. |
3004 | F | Subscription Not Found. |
3005 | F | Some error occurred. |
3017 | F | Subscription is in invalid state. |
3037 | F | Amount not authorized for subscription. |
3038 | F | Consult not supported for paymode corresponding to subscription. |
curl --location --request POST 'https://secure.paytmpayments.com/subscription/v3/consult' \
--header 'Content-Type: application/json' \
--data-raw '{
"head": {
"version": "v1",
"timestamp": "1239864578",
"signature": "1JrC8iewAlQCzFEF+t/JUCMEu3PdBLs8smEEq/qabXMPsHa3GGOHmfqhV028tRzxcs0S5wUBOoaVP2kye1ywBxjDz5MSxVVkSA3VaUSamzo=",
"tokenType": "AES",
"clientId": "1234"
},
"body": {"subsId":"100554661599","amount":1.00,"mid":"YOUR_MID_HERE"}
}'