Getting subscription status [DEPRECATED]
DEPRECATED
This method is intended for use with the BillingClient SDK, which has been marked as deprecated.
This method allows retrieving subscription status using a subscription token.
Interaction parameters
GET
https://public-api.rustore.ru/public/subscription/{subscriptionToken}/state
| Attribute | Type | Description | Required | Location | Example |
|---|---|---|---|---|---|
Public-Token | string | Jwe token to Public API Rustore How to get an authorization token. | Yes | header | N/A |
subscriptionToken | string | How to get a subscription token Billing SDK Documentation. | Yes | path | 111.123 |
Response example
| Attribute | Type | Description | Required | Location | Example |
|---|---|---|---|---|---|
code | number | Response code | Yes | body | • ОК;• ERROR;• BAD_REQUEST;• NOT_FOUND. |
message | date | Decoded response code | No | body | Jwe token is expired |
body{} | object | Response body | No | body | N/A |
timestamp | string | Response time | Yes | body | 2023-08-02T10:11:04.655684723+03:00 |
body{}
| Attribute | Type | Description | Required | Location | Example |
|---|---|---|---|---|---|
is_active | boolean | Subscription activity flag. Calculated by subscription status: • true — subscription active, in one of the following periods: PROMO, START, STANDARD, GRACE;• false — subscription is inactive: in HOLD— period or terminated. | Yes | body.body | true |
Successful response
{
"code": "OK",
"message": null,
"body":
{
"is_active": true
},
"timestamp": "2024-01-21T14:08:33.548812228+03:00"
}
Error response
{
"code": "ERROR",
"message": "Jwe token is expired",
"body": null,
"timestamp": "2024-01-21T13:51:59.654427798+03:00"
}
Response verification
The security token is generated by the security token method and then verified while getting the response:
-
Owner and/or app should not be blocked;
-
Token should be valid;
-
subscription should be purchased in an application owned by a company that has received a Public API access token.