POSTFetch Subscription Status API
Use Case
This API provides the status and the details of the subscription being asked.
Request Attributes
Head
Attribute | Description |
---|---|
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. |
tokenType string mandatory | AES – signature is mandatory for checksum validation. |
signature string(108) 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 conditional | Subscription ID - Only Subscription flow Conditional: either use subsId OR (custId & orderId) with mid in request. |
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 |
custId string(64) conditional | Customer ID whose subscription is being cancelled Conditional: either use subsId OR (custId & orderId) with mid in request |
orderid string conditional | The Unique reference ID of the Order. It is alphanumeric and special characters allowed are “@” “-” “_” “.”. Conditional: either use subsId OR (custId & orderId) with mid in request |
linkId string conditional | linkId that has been returned to merchant while creating link based subscription. Either orderId or subsId or linkId is mandatory. Note: Only one active subscription will exist corresponding to linkId |
Response Attributes
Head
Attribute | Description |
---|---|
responseTimestamp string(15) | EPOCH timestamp of the time at which response is being sent. |
tokenType string | AES – signature is mandatory for checksum validation. |
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) | You should validate the parameter values by verifying the signature comes in the response. It ensures that parameter values not tempered. Signature string can be verified by using Paytm checksum library. |
Body
Attribute | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
resultInfo object | This parameter gives the information about the result of the API response | ||||||||||||||||||||||||||||||
ResultInfo +
| |||||||||||||||||||||||||||||||
subsId string | Subscription ID - Only Subscription flow | ||||||||||||||||||||||||||||||
payMode string | Pay mode of the subscription | ||||||||||||||||||||||||||||||
status string | Current status of the subscription Possible Values: INIT, ACTIVE, REJECT, IN_AUTHORIZATION, AUTHORIZED, AUTHORIZATION_FAILED, EXPIRED, CLOSED, SUSPENDED | ||||||||||||||||||||||||||||||
subStatus string | Status of the subscription payMode Possible Values: INIT, PPBL_PENDING, PPBL_REJECT, NPCI_PENDING, NPCI_REJECT, ACTIVE, | ||||||||||||||||||||||||||||||
activationDate string | Time when the subscription was activated | ||||||||||||||||||||||||||||||
vpa string | Masked vpa for the subscription (only in case of Paymode UPI) | ||||||||||||||||||||||||||||||
orderId string | The Unique reference ID of the Order. It is alphanumeric and special characters allowed are “@” “-” “_” “.”. | ||||||||||||||||||||||||||||||
subsPaymentInstDetails object | subscription payment instrument details | ||||||||||||||||||||||||||||||
SubsPaymentInstDetails +
| |||||||||||||||||||||||||||||||
subsLastRetryDone object | Last retry done on subscription | ||||||||||||||||||||||||||||||
SubsLastRetryDone +
| |||||||||||||||||||||||||||||||
subsNextRetry string | Details of next retry that would be done | ||||||||||||||||||||||||||||||
SubsNextRetry +
| |||||||||||||||||||||||||||||||
subsRetryDetails object | Details of retries done on subscription | ||||||||||||||||||||||||||||||
SubsRetryDetails +
| |||||||||||||||||||||||||||||||
lastOrderId string | Order Id of the last order created | ||||||||||||||||||||||||||||||
lastOrderStatus string | Order status of the last order created | ||||||||||||||||||||||||||||||
lastOrderCreationDate string | Creation time of the last order. Format - yyyy-mm-dd hh:mm:ss | ||||||||||||||||||||||||||||||
lastOrderAmount string | Amount of the last order | ||||||||||||||||||||||||||||||
amountType string | amountType of subscription Possible Values: FIX, VARIABLE | ||||||||||||||||||||||||||||||
maxAmount string | Maximum amount Example: 1000.0 | ||||||||||||||||||||||||||||||
mid string | 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 | ||||||||||||||||||||||||||||||
frequencyUnit string | frequencyUnit of subscription Possible Values: DAY, MONTH, YEAR, WEEK, QUARTER, BI_MONTHLY, SEMI_ANNUALLY | ||||||||||||||||||||||||||||||
frequency string | Value of the frequency | ||||||||||||||||||||||||||||||
merchantName string | Merchant Display Name | ||||||||||||||||||||||||||||||
expiryDate string | Expiry Date for the subscription. Format - yyyy-mm-dd hh:mm:ss | ||||||||||||||||||||||||||||||
createdDate string | Created Date for the subscription. Format - yyyy-mm-dd hh:mm:ss | ||||||||||||||||||||||||||||||
updatedDate string | Updated Date for the subscription. Format - yyyy-mm-dd hh:mm:ss | ||||||||||||||||||||||||||||||
custId string | Customer Id passed by the merchant | ||||||||||||||||||||||||||||||
custEmailId string | Customer Email passed by the merchant | ||||||||||||||||||||||||||||||
custMobileNo string | Customer mobile number passed by the merchant | ||||||||||||||||||||||||||||||
respCode string | Responsce Code, only when subscription not created successfully | ||||||||||||||||||||||||||||||
respMsg string | Responsce Message, only when subscription not created successfully | ||||||||||||||||||||||||||||||
upfrontTxnAmount string | Amount deducted at time of subscription creation | ||||||||||||||||||||||||||||||
upfrontTxnId string | Txn Id for the payment at time of subscription creation | ||||||||||||||||||||||||||||||
pauseStartDate string | Start date for the paused/suspended state of the subscription (This information shall be shared only for paused subscriptions). | ||||||||||||||||||||||||||||||
pauseEndDate string | End date for the paused/suspended state of the subscription (This information shall be shared only for paused subscriptions). |
Response Codes & Messages
code | status | message |
---|---|---|
3006 | SUCCESS | SUCCESS |
400 | FAILURE | The request cannot be validated. Please refer to the doc and try again. |
3004 | FAILURE | Subscription Not Found. |
3005 | FAILURE | Some error occured. |
3045 | FAILURE | Both orderId and subscriptionId cannot be null. |
curl -X POST 'https://securestage.paytmpayments.com/subscription/checkStatus' \
--header 'Content-Type: application/json' \
--data '{"body":{"mid":"{mid}","subsId":"67491"},"head":{"tokenType":"AES","signature":"{signature}"}}'