Purchases
Entry point for Purchases. It should be instantiated as soon as your app has a unique user id for your user. This can be when a user logs in if you have accounts or on launch if you can generate a random user identifier. Make sure you follow the quickstart guide to setup your RevenueCat account.
Types
Functions
Automatically collect subscriber attributes associated with the device identifiers $gpsAdId, $androidId, $ip
Gets the SKUDetails for the given list of non-subscription skus.
Fetch the configured offerings for this users. Offerings allows you to configure your in-app products vis RevenueCat and greatly simplifies management. See the guide for more info.
Get latest available purchaser info.
Gets the SKUDetails for the given list of subscription skus.
Invalidates the cache for purchaser information.
This function will change the current appUserID. Typically this would be used after a log out to identify a new user without calling configure
Resets the Purchases client clearing the save appUserID. This will generate a random user id and save it in the cache.
Make a purchase.
Change the product from productChangeInfo with the one in packageToPurchase.
Make a purchase.
Call this when you are finished using the UpdatedPurchaserInfoListener. You should call this to avoid memory leaks.
Restores purchases made with the current Play Store account for the current user. This method will post all purchases associated with the current Play Store account to RevenueCat and become associated with the current appUserID
. If the receipt token is being used by an existing user, the current appUserID
will be aliased together with the appUserID
of the existing user. Going forward, either appUserID
will be able to reference the same user.
Subscriber attribute associated with the install ad group for the user
Subscriber attribute associated with the Adjust Id for the user Required for the RevenueCat Adjust integration
Subscriber attribute associated with the Airship Channel ID Required for the RevenueCat Airship integration
Subscriber attribute associated with the AppsFlyer Id for the user Required for the RevenueCat AppsFlyer integration
Subscriber attributes are useful for storing additional, structured information on a user. Since attributes are writable using a public key they should not be used for managing secure or sensitive information such as subscription status, coins, etc.
Subscriber attribute associated with the install campaign for the user
Subscriber attribute associated with the install ad creative for the user
Subscriber attribute associated with the display name for the user
Subscriber attribute associated with the Facebook SDK Anonymous Id for the user Recommended for the RevenueCat Facebook integration
Subscriber attribute associated with the install keyword for the user
Subscriber attribute associated with the install media source for the user
Subscriber attribute associated with the mParticle Id for the user Recommended for the RevenueCat mParticle integration
Subscriber attribute associated with the OneSignal Player Id for the user Required for the RevenueCat OneSignal integration
Subscriber attribute associated with the phone number for the user
Subscriber attribute associated with the push token for the user
This method will send all the purchases to the RevenueCat backend. Call this when using your own implementation for subscriptions anytime a sync is needed, like after a successful purchase.
Properties
The listener is responsible for handling changes to purchaser information. Make sure removeUpdatedPurchaserInfoListener is called when the listener needs to be destroyed.
Extensions
This function will alias two appUserIDs together.
Gets the SKUDetails for the given list of non-subscription skus.
Fetch the configured offerings for this users. Offerings allows you to configure your in-app products vis RevenueCat and greatly simplifies management. See the guide for more info.
Get latest available purchaser info.
Gets the SKUDetails for the given list of subscription skus.
This function will change the current appUserID. Typically this would be used after a log out to identify a new user without calling configure
This function will change the current appUserID. Typically this would be used after a log out to identify a new user without calling configure
Logs out the Purchases client clearing the save appUserID. This will generate a random user id and save it in the cache.
Make a purchase.
Purchase product.
Make a purchase.
Resets the Purchases client clearing the save appUserID. This will generate a random user id and save it in the cache.
Restores purchases made with the current Play Store account for the current user. This method will post all purchases associated with the current Play Store account to RevenueCat and become associated with the current appUserID
. If the receipt token is being used by an existing user, the current appUserID
will be aliased together with the appUserID
of the existing user. Going forward, either appUserID
will be able to reference the same user.