POSTFetch Subscription Status API
Use Case
This API provides the status and the details of the subscription being asked.
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.
|
Body
Attribute | Description |
---|---|
subsId string conditional | Subscription ID - Only Subscription flow |
mid string mandatory | This is a unique identifier provided to every merchant by AI router. Example: 216820000002516036253 |
orderId string conditional | 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 |
custId string conditional | Customer ID whose subscription is being canceled |
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 Object | This parameter gives the information about the result in the API response | ||||||||||||||||||||
subsId string | Unique Subscription ID generated by AI router for identifying a subscription transaction | ||||||||||||||||||||
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 | ||||||||||||||||||||
activationDate string | Time when the subscription was activated | ||||||||||||||||||||
vpa string | Masked vpa for the subscription | ||||||||||||||||||||
orderId string | The Unique reference ID of the Order. It is alphanumeric and special characters allowed are “@” “-” “_” “.”. Example: OREDRID_98765 | ||||||||||||||||||||
subsPaymentInstDetails object | subscription payment instrument details | ||||||||||||||||||||
subsPaymentInstDetails +
| |||||||||||||||||||||
subsLastRetryDone Object | Last retry done on subscription | ||||||||||||||||||||
SubsLastRetryDone +
| |||||||||||||||||||||
subsNextRetry Object | Details of next retry that would be done | ||||||||||||||||||||
SubsNextRetry +
| |||||||||||||||||||||
subsRetryDetails Object |
| ||||||||||||||||||||
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 | This is a unique identifier provided to every merchant by AI router. Example: 216820000002516036253 | ||||||||||||||||||||
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 | ||||||||||||||||||||
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 | ||||||||||||||||||||
resultInfo string | This parameter gives the information about the result in the API response | ||||||||||||||||||||
resultInfo +
| |||||||||||||||||||||
upfrontTxnAmount string | Amount deducted at time of subscription creation | ||||||||||||||||||||
upfrontTxnId string | Txn Id for the payment at time of subscription creation |
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
3006 | SUCCESS | SUCCESS |
3045 | FAILURE | custId is mandatory with orderId |
3045 | FAILURE | Both orderId and subscriptionId/LinkId cannot be null |
3005 | FAILURE | Some error occured |
400 | FAILURE | The request cannot be validated. Please refer to the doc and try again. |
3004 | FAILURE | Subscription Not Found |
400 | FAILURE | Mid is invalid |
3001 | FAILURE | Subscription Id is Invalid |
curl --location 'https://stage-router.paytm.in/aoa-subscription/api/v2/subscription/checkStatus' \
--header 'Content-Type: application/json' \
--data '{"head": {"timestamp": 1672140318157,"signature": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWJzSWQiOiIxMjMiLCJpc3MiOiJzdXBlcmd3IiwibWlkIjoiMjE2ODIwMDAwMDA4ODU3MTg4ODE1IiwidGltZXN0YW1wIjoiMTY2MzU4OTk3NDg3MCJ9.yIjb7TLb_-iY1jysWgGtzLCooRQrkerqIMZ4HobeERk"},"body": {"mid": "YOUR_MID_HERE","subscriptionId": "10001457","orderId": "","custId": ""}}'