Getting subscription data (V3)
This method allows retrieving subscription info using a subscription token.
Interaction parameters
GET
https://public-api.rustore.ru/public/v3/subscription/{packageName}/{subscriptionId}/{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 |
packageName | string | App package name | Yes | path | com.MashaAndTheBear.HairSalon |
subscriptionId | string | Product/subscription code To be specified by the developer when creating the product in RuStore Console. How to create an app subscription. | Yes | path | daily_sub |
subscriptionToken | string | How to get a subscription token Billing SDK Documentation. | Yes | path | 111.123 |
Successful response
Attribute | Type | Description | Required | Example |
---|---|---|---|---|
startTimeMillis | string | Subscription provisioning time in milliseconds since epoch start. | Yes | 1577826955637 |
expiryTimeMillis | string | Subscription expiration time in milliseconds from the epoch start. | Yes | 1609456386128 |
autoRenewing | boolean | Whether the subscription will automatically renew at the end of the current expiry date. | Yes | false |
priceCurrencyCode | string | ISO 4217 currency code for the subscription price. | Yes | RUB |
priceAmountMicros | string | Subscription price. Price is expressed in micro units, where 1,000,000 micro units represents one unit of currency. For example, if the subscription price is 100 rubles, the price of AmountMicros is 100000000. | Yes | 749000000 |
countryCode | string | The user's billing country/region code at the time the subscription is granted. | Yes | RU |
paymentState | int | Subscription Payment Status. Available values: • 0 — awaiting payment • 1 — receiving payment; • 2 — free trial. Not available for cancelled expired subscriptions. | No, for active subscriptions only | 1 |
cancelReason | int | The reason why the subscription was cancelled or not renewed automatically. Available values: • 0 — subscription cancelled by the user• 1 — subscription cancelled by the system, e.g. due to a payment problem. | No, only for cancelled subscriptions with a status of CLOSED | 0 |
orderId | string | Last invoice ID associated with the subscription purchase. If there is more than one subscription account, their number is added to the identifier using the separator "...", starting from 0 | Yes | 41456..3 |
acknowledgementState | int | Subscription Confirmation Status. Available values: • 0 — not yet confirmed; • 1 — confirmed. | Yes | 1 |
introductoryPriceInfo{} | object | Information about the promotional subscription period. This field does not indicate that the subscription is currently in a promotional period. | No, only for subscriptions with a PROMO period. | N/A |
kind | string | It always passes the value androidpublisher#subscriptionPurchase | Yes | androidpublisher#subscriptionPurchase |
purchaseType | int | It always passes 0 . | Yes | 0 |