API reference

SkuDetails Class

Modifiers: final
DeprecatedThis class is deprecated. Use [BillingClient.queryProductDetailsAsync] instead.
Represents an in-app product's or subscription's listing details.
The equivalent Google Play Billing Library class can be found at the Android developer documentation for SkuDetails.

Signature

data class SkuDetails(val price: String, val priceAmountMicros: Long, val priceCurrencyCode: String, val sku: String, val subscriptionPeriod: String, val title: String, val description: String, val type: String, val originalPrice: String = "", val originalPriceAmountMicros: Long = 0, val originalJson: String = "", val introductoryPrice: String = "", val introductoryPriceAmountMicros: Long = 0, val introductoryPriceCycles: Int = 0, val introductoryPricePeriod: String = "", val iconUrl: String = "", val freeTrialPeriod: String = "")

Constructors

SkuDetails ( evoProduct )
Signature
constructor(evoProduct: Product)
Parameters
evoProduct: Product
Returns
SkuDetails ( originalJson )
Signature
constructor(originalJson: String)
Parameters
originalJson: String
Returns
SkuDetails ( price , priceAmountMicros , priceCurrencyCode , sku , subscriptionPeriod , title , description , type , originalPrice , originalPriceAmountMicros , originalJson , introductoryPrice , introductoryPriceAmountMicros , introductoryPriceCycles , introductoryPricePeriod , iconUrl , freeTrialPeriod )
Signature
constructor(price: String, priceAmountMicros: Long, priceCurrencyCode: String, sku: String, subscriptionPeriod: String, title: String, description: String, type: String, originalPrice: String = "", originalPriceAmountMicros: Long = 0, originalJson: String = "", introductoryPrice: String = "", introductoryPriceAmountMicros: Long = 0, introductoryPriceCycles: Int = 0, introductoryPricePeriod: String = "", iconUrl: String = "", freeTrialPeriod: String = "")
Parameters
price: String
priceAmountMicros: Long
priceCurrencyCode: String
sku: String
subscriptionPeriod: String
title: String
description: String
type: String
originalPrice: String
originalPriceAmountMicros: Long
originalJson: String
introductoryPrice: String
introductoryPriceAmountMicros: Long
introductoryPriceCycles: Int
introductoryPricePeriod: String
iconUrl: String
freeTrialPeriod: String
Returns

Properties

description : String
[Get]
Returns the description of the product.
Signature
val description: String
freeTrialPeriod : String
[Get]
Trial period configured in the Developer Dashboard, specified in ISO 8601 format. For example, P7D equates to seven days. To learn more about free trial eligibility, see In-app Subscriptions.
Note: Returned only for subscriptions which have a trial period configured.
Signature
val freeTrialPeriod: String
iconUrl : String
[Get]
Returns the icon of the product if present.
Signature
val iconUrl: String
introductoryPrice : String
[Get]
Formatted introductory price of a subscription, including its currency sign, such as €3.99. For tax exclusive countries, the price doesn't include tax.
Note: Returned only for subscriptions which have an introductory period configured.
Signature
val introductoryPrice: String
introductoryPriceAmountMicros : Long
[Get]
Introductory price in micro-units. The currency is the same as price_currency_code.
Note: Returns 0 if the SKU is not a subscription or doesn't have an introductory period.
Signature
val introductoryPriceAmountMicros: Long = 0
introductoryPriceCycles : Int
[Get]
The number of subscription billing periods for which the user will be given the introductory price, such as 3.
Note: Returns 0 if the SKU is not a subscription or doesn't have an introductory period.
Signature
val introductoryPriceCycles: Int = 0
introductoryPricePeriod : String
[Get]
The billing period of the introductory price, specified in ISO 8601 format.
Note: Returned only for subscriptions which have an introductory period configured.
Signature
val introductoryPricePeriod: String
originalJson : String
[Get]
Returns a String in JSON format that contains SKU details.
Signature
val originalJson: String
originalPrice : String
[Get]
Returns formatted original price of the item, including its currency sign.
The original price is the price of the item before any applicable sales have been applied. For tax exclusive countries, the price doesn't include tax.
Signature
val originalPrice: String
originalPriceAmountMicros : Long
[Get]
Returns the original price in micro-units, where 1,000,000 micro-units equal one unit of the currency.
The original price is the price of the item before any applicable sales have been applied.
For example, if original price is "€7.99", original_price_amount_micros is "7990000". This value represents the localized, rounded price for a particular currency.
Signature
val originalPriceAmountMicros: Long = 0
price : String
[Get]
Returns formatted price of the item, including its currency sign.
For tax exclusive countries, the price doesn't include tax.
Signature
val price: String
priceAmountMicros : Long
[Get]
Returns price in micro-units, where 1,000,000 micro-units equal one unit of the currency.
For example, if price is "€7.99", price_amount_micros is "7990000". This value represents the localized, rounded price for a particular currency.
Signature
val priceAmountMicros: Long
priceCurrencyCode : String
[Get]
Returns ISO 4217 currency code for price and original price.
For example, if price is specified in British pounds sterling, price_currency_code is "GBP".
Signature
val priceCurrencyCode: String
sku : String
[Get]
Returns the product Id.
Signature
val sku: String
subscriptionPeriod : String
[Get]
Subscription period, specified in ISO 8601 format. For example, P1W equates to one week, P1M equates to one month, P3M equates to three months, P6M equates to six months, and P1Y equates to one year.
Note: Returned only for subscriptions.
Signature
val subscriptionPeriod: String
title : String
[Get]
Returns the title of the product being sold.
The title includes the name of the app which owns the product. Example: 100 Gold Coins (Coin selling app).
Signature
val title: String
type : String
[Get]
Returns the {@link BillingClient.SkuType} of the SKU.
Signature
val type: String
Did you find this page helpful?