Getting subscription data [DEPRECATED]
DEPRECATED
This method is intended for use with the BillingClient SDK, which has been marked as deprecated.
This method allows retrieving subscription info using a subscription token.
Interaction parameters
GET
https://public-api.rustore.ru/public/subscription/{subscriptionToken}
| 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 |
|---|---|---|---|---|---|
code | number | Response code | Yes | body | 0 |
success | boolean | Response success flag | Yes | body | true |
message | string | Decoded response code | No | body | Unknown error |
body{} | object | Response body | No | body | N/A |
body.body{}
| Attribute | Type | Description | Example |
|---|---|---|---|
serviceName | string | Service name | Okko |
subscriptionId | integer | Unique subscription ID | 12345 |
addParameters | string | Additional subscription options | Something about subscription |
productType | string | Product type. | SUBSCRIPTION |
productName | string | Product name | Okko optimum |
productCode | string | Product code. | monthly_sub |
recurrent | boolean | Recurrency sign | true |
countOfDay | integer | Number of days | 10 |
periodType | string | Period type. | Available values: • DAY;• MONTH;• YEAR. |
periodDuration | integer | Period duration | 10 |
nextPaymentDate | string | Next payment date | 2021-03-23 |
price | integer | Price in minimum currency unit (kopecks) | 9999 |
currency | string | Currency. | RUB |
imageUrl | string | Link to product picture | N/A |
state | string | Subscription status | Available values: • ACTIVATED — active subscription. Interim Statuses • ACCEPTED — awaiting payment; • DEPOSITED — payment has been made, subscription awaiting activation; • CLOSE_PENDING — subscription is in the process of being closed; • REPEATING — subscription is in the process of renewal, an attempt is made to charge money for renewal. Final Statuses • DECLINED — subscription closed, all attempts at regular subscription payments failed, GRACE and HOLD periods and number of renewal attempts expired; • CANCELED — user has not paid for subscription; • CLOSED — subscription is closed; user has switched off the subscription auto-renewal, the paid period has expired, provider has confirmed that subscription was closed; • REFUNDED — refund to the user has been initiated. |
currentPeriod | string | Current period. | **Available values: ** • PROMO — trial period; • START — discounted start period; • STANDARD — standard period; • GRACE — grace period, user has not paid for the subscription, debit attempts continue, access is retained; • HOLD — hold period, user has not paid for the subscription, debit attempts continue, access must be terminated. |
debtPaymentPeriod | string | Name of payment period | Null if the period is standard. |
description | string | Subscription product description | Description |
tariffId | integer | Unique rate ID | 12345 |
periods [] | array[object] | Current period info | More details. |
body.body.periods []
| Attribute | Type | Description | Example |
|---|---|---|---|
periodName | string | Current period. | Available values: • PROMO;• START;• STANDARD;• GRACE;• HOLD. |
periodType | string | Period type. | Available values: • DAY;• MONTH;• YEAR. |
periodDuration | number | Period duration | 10 |
periodPrice | number | Price in minimum currency unit | 10000 |
nextPeriod | string | Next period name | Available values: |