StoreProduct

interface StoreProduct

Represents an in-app product's or subscription's listing details.

Inheritors

Functions

Link copied to clipboard

For internal RevenueCat use.

Link copied to clipboard
open fun formattedPricePerMonth(locale: Locale = Locale.getDefault()): String?

Null for INAPP products. The price of the StoreProduct in the given locale in a monthly recurrence. This means that, for example, if the period is annual, the price will be divided by 12. It uses a currency formatter to format the price in the given locale. Note that this value may be an approximation. For Google subscriptions, this value will use the basePlan to calculate the value.

Link copied to clipboard
open fun pricePerMonth(locale: Locale = Locale.getDefault()): Price?

Null for INAPP products. The price of the StoreProduct in the given locale in a monthly recurrence. This means that, for example, if the period is annual, the price will be divided by 12. It uses a currency formatter to format the price in the given locale. Note that this value may be an approximation. For Google subscriptions, this value will use the basePlan to calculate the value.

Link copied to clipboard
open fun pricePerWeek(locale: Locale = Locale.getDefault()): Price?

Null for INAPP products. The price of the StoreProduct in the given locale in a weekly recurrence. This means that, for example, if the period is monthly, the price will be divided by 4. It uses a currency formatter to format the price in the given locale. Note that this value may be an approximation. For Google subscriptions, this value will use the basePlan to calculate the value.

Link copied to clipboard
open fun pricePerYear(locale: Locale = Locale.getDefault()): Price?

Null for INAPP products. The price of the StoreProduct in the given locale in a yearly recurrence. This means that, for example, if the period is monthly, the price will be multiplied by 12. It uses a currency formatter to format the price in the given locale. Note that this value may be an approximation. For Google subscriptions, this value will use the basePlan to calculate the value.

Properties

Link copied to clipboard

StoreProduct object containing Amazon-specific fields: originalProductJson freeTrialPeriod iconUrl

Link copied to clipboard

The default SubscriptionOption that will be used when purchasing and not specifying a different option. Null for INAPP products.

Link copied to clipboard
abstract val description: String

The description of the product.

Link copied to clipboard

StoreProduct object containing Google-specific fields: productId basePlanId productDetails

Link copied to clipboard
abstract val id: String

The product ID. Google INAPP: "" Google Sub: "productId:basePlanID" Amazon INAPP: "" Amazon Sub: ""

Link copied to clipboard
abstract val name: String

Name of the product.

Link copied to clipboard
abstract val period: Period?

Subscription period.

Link copied to clipboard

The context from which this product was obtained.

Link copied to clipboard
abstract val price: Price

Price information for a non-subscription product. Base plan price for a Google subscription. Term price for an Amazon subscription. For Google subscriptions, use SubscriptionOption's pricing phases for offer pricing.

Link copied to clipboard

Contains only data that is required to make the purchase.

Link copied to clipboard

Contains all SubscriptionOptions. Null for Amazon or for INAPP products.

Link copied to clipboard
abstract val title: String

Title of the product.

Link copied to clipboard
abstract val type: ProductType

Type of product. One of ProductType.