npm package: @revenuecat/purchases-capacitor
Description: Capacitor in-app purchases and subscriptions made easy. Support for iOS and Android.
Author: RevenueCat, Inc.
Latest version: 12.3.2

<h3 align="center">😻 In-App Subscriptions Made Easy 😻</h3>

[![License](https://img.shields.io/github/license/RevenueCat/purchases-capacitor.svg?style=flat)](https://github.com/RevenueCat/purchases-capacitor/blob/main/LICENSE)
[![Release](https://img.shields.io/github/release/RevenueCat/purchases-capacitor.svg?style=flat)](https://github.com/RevenueCat/purchases-capacitor/releases)

RevenueCat is a powerful, reliable, and free to use in-app purchase server with cross-platform support. Our open-source framework provides a backend and a wrapper around StoreKit and Google Play Billing to make implementing in-app purchases and subscriptions easy.

Whether you are building a new app or already have millions of customers, you can use RevenueCat to:

* Fetch products, make purchases, and check subscription status with our [native SDKs](https://docs.revenuecat.com/docs/installation).
* Host and [configure products](https://docs.revenuecat.com/docs/entitlements) remotely from our dashboard.
* Analyze the most important metrics for your app business [in one place](https://docs.revenuecat.com/docs/charts).
* See customer transaction histories, chart lifetime value, and [grant promotional subscriptions](https://docs.revenuecat.com/docs/customers).
* Get notified of real-time events through [webhooks](https://docs.revenuecat.com/docs/webhooks).
* Send enriched purchase events to analytics and attribution tools with our easy integrations.

Sign up to [get started for free](https://app.revenuecat.com/signup).

## @revenuecat/purchases-capacitor

*@revenuecat/purchases-capacitor* is the client for the [RevenueCat](https://www.revenuecat.com/) subscription and purchase tracking system. It is an open source framework that provides a wrapper around StoreKit, Google Play Billing and the RevenueCat backend to make implementing in-app purchases in Capacitor easy.

## RevenueCat SDK Features
|    | RevenueCat                                                                                                                                                   |
|----|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ✅  | Server-side receipt validation                                                                                                                               |
| ➡️ | [Webhooks](https://docs.revenuecat.com/docs/webhooks) - enhanced server-to-server communication with events for purchases, renewals, cancellations, and more |
| 🎯 | Subscription status tracking - know whether a user is subscribed whether they're on iOS, Android or web                                                      |
| 📊 | Analytics - automatic calculation of metrics like conversion, mrr, and churn                                                                                 |
| 📝 | [Online documentation](https://docs.revenuecat.com/docs) up to date                                                                                          |
| 🔀 | [Integrations](https://www.revenuecat.com/integrations) - over a dozen integrations to easily send purchase data where you need it                           | 
| 💯 | Well maintained - [frequent releases](https://github.com/RevenueCat/purchases-capacitor/releases)                                                            |
| 📮 | Great support - [Help Center](https://revenuecat.zendesk.com)                                                                                                |

## Getting Started
For more detailed information, you can view our complete documentation at [docs.revenuecat.com](https://docs.revenuecat.com/docs).

Please follow the [Quickstart Guide](https://docs.revenuecat.com/docs/) for more information on how to install the SDK.

```bash
npm install @revenuecat/purchases-capacitor
npx cap sync
```

## Contributing
Contributions are always welcome! To learn how you can contribute, please see the [Contributing Guide](./CONTRIBUTING.md).

## Acknowledgment

This plugin is based on [CapGo's Capacitor plugin](https://www.npmjs.com/package/@capgo/capacitor-purchases). The plugin was transferred to RevenueCat to become an officially supported plugin.

## API

<docgen-index>

* [`configure(...)`](#configure)
* [`getVirtualCurrencies()`](#getvirtualcurrencies)
* [`invalidateVirtualCurrenciesCache()`](#invalidatevirtualcurrenciescache)
* [`getCachedVirtualCurrencies()`](#getcachedvirtualcurrencies)
* [`parseAsWebPurchaseRedemption(...)`](#parseaswebpurchaseredemption)
* [`redeemWebPurchase(...)`](#redeemwebpurchase)
* [`setMockWebResults(...)`](#setmockwebresults)
* [`setSimulatesAskToBuyInSandbox(...)`](#setsimulatesasktobuyinsandbox)
* [`addCustomerInfoUpdateListener(...)`](#addcustomerinfoupdatelistener)
* [`removeCustomerInfoUpdateListener(...)`](#removecustomerinfoupdatelistener)
* [`getOfferings()`](#getofferings)
* [`getCurrentOfferingForPlacement(...)`](#getcurrentofferingforplacement)
* [`syncAttributesAndOfferingsIfNeeded()`](#syncattributesandofferingsifneeded)
* [`getProducts(...)`](#getproducts)
* [`purchaseStoreProduct(...)`](#purchasestoreproduct)
* [`purchaseDiscountedProduct(...)`](#purchasediscountedproduct)
* [`purchasePackage(...)`](#purchasepackage)
* [`purchaseSubscriptionOption(...)`](#purchasesubscriptionoption)
* [`purchaseDiscountedPackage(...)`](#purchasediscountedpackage)
* [`restorePurchases()`](#restorepurchases)
* [`recordPurchase(...)`](#recordpurchase)
* [`getAppUserID()`](#getappuserid)
* [`getStorefront()`](#getstorefront)
* [`logIn(...)`](#login)
* [`logOut()`](#logout)
* [`setLogLevel(...)`](#setloglevel)
* [`setLogHandler(...)`](#setloghandler)
* [`getCustomerInfo()`](#getcustomerinfo)
* [`syncPurchases()`](#syncpurchases)
* [`syncObserverModeAmazonPurchase(...)`](#syncobservermodeamazonpurchase)
* [`syncAmazonPurchase(...)`](#syncamazonpurchase)
* [`enableAdServicesAttributionTokenCollection()`](#enableadservicesattributiontokencollection)
* [`isAnonymous()`](#isanonymous)
* [`checkTrialOrIntroductoryPriceEligibility(...)`](#checktrialorintroductorypriceeligibility)
* [`getPromotionalOffer(...)`](#getpromotionaloffer)
* [`getEligibleWinBackOffersForProduct(...)`](#geteligiblewinbackoffersforproduct)
* [`getEligibleWinBackOffersForPackage(...)`](#geteligiblewinbackoffersforpackage)
* [`purchaseProductWithWinBackOffer(...)`](#purchaseproductwithwinbackoffer)
* [`purchasePackageWithWinBackOffer(...)`](#purchasepackagewithwinbackoffer)
* [`invalidateCustomerInfoCache()`](#invalidatecustomerinfocache)
* [`presentCodeRedemptionSheet()`](#presentcoderedemptionsheet)
* [`setAttributes(...)`](#setattributes)
* [`setEmail(...)`](#setemail)
* [`setPhoneNumber(...)`](#setphonenumber)
* [`setDisplayName(...)`](#setdisplayname)
* [`setPushToken(...)`](#setpushtoken)
* [`setProxyURL(...)`](#setproxyurl)
* [`collectDeviceIdentifiers()`](#collectdeviceidentifiers)
* [`setAdjustID(...)`](#setadjustid)
* [`setAppsflyerID(...)`](#setappsflyerid)
* [`setFBAnonymousID(...)`](#setfbanonymousid)
* [`setMparticleID(...)`](#setmparticleid)
* [`setCleverTapID(...)`](#setclevertapid)
* [`setMixpanelDistinctID(...)`](#setmixpaneldistinctid)
* [`setFirebaseAppInstanceID(...)`](#setfirebaseappinstanceid)
* [`setOnesignalID(...)`](#setonesignalid)
* [`setOnesignalUserID(...)`](#setonesignaluserid)
* [`setAirshipChannelID(...)`](#setairshipchannelid)
* [`setMediaSource(...)`](#setmediasource)
* [`setCampaign(...)`](#setcampaign)
* [`setAdGroup(...)`](#setadgroup)
* [`setAd(...)`](#setad)
* [`setKeyword(...)`](#setkeyword)
* [`setCreative(...)`](#setcreative)
* [`canMakePayments(...)`](#canmakepayments)
* [`beginRefundRequestForActiveEntitlement()`](#beginrefundrequestforactiveentitlement)
* [`beginRefundRequestForEntitlement(...)`](#beginrefundrequestforentitlement)
* [`beginRefundRequestForProduct(...)`](#beginrefundrequestforproduct)
* [`showInAppMessages(...)`](#showinappmessages)
* [`isConfigured()`](#isconfigured)
* [`overridePreferredUILocale(...)`](#overridepreferreduilocale)
* [`trackCustomPaywallImpression(...)`](#trackcustompaywallimpression)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)
* [Enums](#enums)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### configure(...)

```typescript
configure(configuration: PurchasesConfiguration) => Promise<void>
```

Sets up Purchases with your API key and an app user id.

| Param               | Type                                                                      | Description                                                                                                                                                   |
| ------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`configuration`** | <code><a href="#purchasesconfiguration">PurchasesConfiguration</a></code> | RevenueCat configuration object including the API key and other optional parameters. See {@link <a href="#purchasesconfiguration">PurchasesConfiguration</a>} |

--------------------


### getVirtualCurrencies()

```typescript
getVirtualCurrencies() => Promise<{ virtualCurrencies: PurchasesVirtualCurrencies; }>
```

Fetches the virtual currencies for the current subscriber.

**Returns:** <code>Promise&lt;{ virtualCurrencies: <a href="#purchasesvirtualcurrencies">PurchasesVirtualCurrencies</a>; }&gt;</code>

--------------------


### invalidateVirtualCurrenciesCache()

```typescript
invalidateVirtualCurrenciesCache() => Promise<void>
```

Invalidates the cache for virtual currencies.

This is useful for cases where a virtual currency's balance might have been updated
outside of the app, like if you decreased a user's balance from the user spending a virtual currency,
or if you increased the balance from your backend using the server APIs.

--------------------


### getCachedVirtualCurrencies()

```typescript
getCachedVirtualCurrencies() => Promise<{ cachedVirtualCurrencies: PurchasesVirtualCurrencies | null; }>
```

The currently cached {@link <a href="#purchasesvirtualcurrencies">PurchasesVirtualCurrencies</a>} if one is available.
This value will remain null until virtual currencies have been fetched at
least once with {@link getVirtualCurrencies} or an equivalent function.

**Returns:** <code>Promise&lt;{ cachedVirtualCurrencies: <a href="#purchasesvirtualcurrencies">PurchasesVirtualCurrencies</a> | null; }&gt;</code>

--------------------


### parseAsWebPurchaseRedemption(...)

```typescript
parseAsWebPurchaseRedemption(options: { urlString: string; }) => Promise<{ webPurchaseRedemption: WebPurchaseRedemption | null; }>
```

Parses the given URL string into a [WebPurchaseRedemption] object that can be used to redeem web purchases.

| Param         | Type                                | Description                             |
| ------------- | ----------------------------------- | --------------------------------------- |
| **`options`** | <code>{ urlString: string; }</code> | Set the urlString used to open the App. |

**Returns:** <code>Promise&lt;{ webPurchaseRedemption: <a href="#webpurchaseredemption">WebPurchaseRedemption</a> | null; }&gt;</code>

--------------------


### redeemWebPurchase(...)

```typescript
redeemWebPurchase(options: { webPurchaseRedemption: WebPurchaseRedemption; }) => Promise<WebPurchaseRedemptionResult>
```

Redeems the web purchase associated with the Redemption Link obtained with [parseAsWebPurchaseRedemption].

| Param         | Type                                                                                                | Description                                                                                                               |
| ------------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ webPurchaseRedemption: <a href="#webpurchaseredemption">WebPurchaseRedemption</a>; }</code> | The <a href="#webpurchaseredemption">WebPurchaseRedemption</a> object obtained from {@link parseAsWebPurchaseRedemption}. |

**Returns:** <code>Promise&lt;<a href="#webpurchaseredemptionresult">WebPurchaseRedemptionResult</a>&gt;</code>

--------------------


### setMockWebResults(...)

```typescript
setMockWebResults(options: { shouldMockWebResults: boolean; }) => Promise<void>
```

Sets whether the SDK should return mocked results in the web version.
This won't affect the iOS and Android versions of the implementation.
Default is false

| Param         | Type                                            | Description                                                                             |
| ------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------- |
| **`options`** | <code>{ shouldMockWebResults: boolean; }</code> | Set shouldMockWebResults to true if you want the plugin methods to return mocked values |

--------------------


### setSimulatesAskToBuyInSandbox(...)

```typescript
setSimulatesAskToBuyInSandbox(options: { simulatesAskToBuyInSandbox: boolean; }) => Promise<void>
```

iOS only.

| Param         | Type                                                  | Description                                                                                                                           |
| ------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ simulatesAskToBuyInSandbox: boolean; }</code> | Set this property to true *only* when testing the ask-to-buy / SCA purchases flow. More information: http://errors.rev.cat/ask-to-buy |

--------------------


### addCustomerInfoUpdateListener(...)

```typescript
addCustomerInfoUpdateListener(customerInfoUpdateListener: CustomerInfoUpdateListener) => Promise<PurchasesCallbackId>
```

Sets a function to be called on updated customer info

| Param                            | Type                                                                              | Description                                              |
| -------------------------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------- |
| **`customerInfoUpdateListener`** | <code><a href="#customerinfoupdatelistener">CustomerInfoUpdateListener</a></code> | <a href="#customerinfo">CustomerInfo</a> update listener |

**Returns:** <code>Promise&lt;string&gt;</code>

--------------------


### removeCustomerInfoUpdateListener(...)

```typescript
removeCustomerInfoUpdateListener(options: { listenerToRemove: PurchasesCallbackId; }) => Promise<{ wasRemoved: boolean; }>
```

Removes a given <a href="#customerinfoupdatelistener">CustomerInfoUpdateListener</a>

| Param         | Type                                       | Description                                                                                         |
| ------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ listenerToRemove: string; }</code> | Include listenerToRemove, which is a CustomerInfoUpdateListener reference of the listener to remove |

**Returns:** <code>Promise&lt;{ wasRemoved: boolean; }&gt;</code>

--------------------


### getOfferings()

```typescript
getOfferings() => Promise<PurchasesOfferings>
```

Gets the map of entitlements -&gt; offerings -&gt; products

**Returns:** <code>Promise&lt;<a href="#purchasesofferings">PurchasesOfferings</a>&gt;</code>

--------------------


### getCurrentOfferingForPlacement(...)

```typescript
getCurrentOfferingForPlacement(options: { placementIdentifier: string; }) => Promise<PurchasesOffering | null>
```

Retrieves a current offering for a placement identifier, use this to access offerings defined by targeting
placements configured in the RevenueCat dashboard.

| Param         | Type                                          |
| ------------- | --------------------------------------------- |
| **`options`** | <code>{ placementIdentifier: string; }</code> |

**Returns:** <code>Promise&lt;<a href="#purchasesoffering">PurchasesOffering</a> | null&gt;</code>

--------------------


### syncAttributesAndOfferingsIfNeeded()

```typescript
syncAttributesAndOfferingsIfNeeded() => Promise<PurchasesOfferings>
```

Syncs subscriber attributes and then fetches the configured offerings for this user. This method is intended to
be called when using Targeting Rules with Custom Attributes. Any subscriber attributes should be set before
calling this method to ensure the returned offerings are applied with the latest subscriber attributes.

**Returns:** <code>Promise&lt;<a href="#purchasesofferings">PurchasesOfferings</a>&gt;</code>

--------------------


### getProducts(...)

```typescript
getProducts(options: GetProductOptions) => Promise<{ products: PurchasesStoreProduct[]; }>
```

Fetch the product info

| Param         | Type                                                            |
| ------------- | --------------------------------------------------------------- |
| **`options`** | <code><a href="#getproductoptions">GetProductOptions</a></code> |

**Returns:** <code>Promise&lt;{ products: PurchasesStoreProduct[]; }&gt;</code>

--------------------


### purchaseStoreProduct(...)

```typescript
purchaseStoreProduct(options: PurchaseStoreProductOptions) => Promise<MakePurchaseResult>
```

Make a purchase

| Param         | Type                                                                                |
| ------------- | ----------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#purchasestoreproductoptions">PurchaseStoreProductOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#makepurchaseresult">MakePurchaseResult</a>&gt;</code>

--------------------


### purchaseDiscountedProduct(...)

```typescript
purchaseDiscountedProduct(options: PurchaseDiscountedProductOptions) => Promise<MakePurchaseResult>
```

iOS only. Purchase a product applying a given discount.

| Param         | Type                                                                                          |
| ------------- | --------------------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#purchasediscountedproductoptions">PurchaseDiscountedProductOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#makepurchaseresult">MakePurchaseResult</a>&gt;</code>

--------------------


### purchasePackage(...)

```typescript
purchasePackage(options: PurchasePackageOptions) => Promise<MakePurchaseResult>
```

Make a purchase

| Param         | Type                                                                      |
| ------------- | ------------------------------------------------------------------------- |
| **`options`** | <code><a href="#purchasepackageoptions">PurchasePackageOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#makepurchaseresult">MakePurchaseResult</a>&gt;</code>

--------------------


### purchaseSubscriptionOption(...)

```typescript
purchaseSubscriptionOption(options: PurchaseSubscriptionOptionOptions) => Promise<MakePurchaseResult>
```

Google only. Make a purchase of a subscriptionOption

| Param         | Type                                                                                            |
| ------------- | ----------------------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#purchasesubscriptionoptionoptions">PurchaseSubscriptionOptionOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#makepurchaseresult">MakePurchaseResult</a>&gt;</code>

--------------------


### purchaseDiscountedPackage(...)

```typescript
purchaseDiscountedPackage(options: PurchaseDiscountedPackageOptions) => Promise<MakePurchaseResult>
```

iOS only. Purchase a package applying a given discount.

| Param         | Type                                                                                          |
| ------------- | --------------------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#purchasediscountedpackageoptions">PurchaseDiscountedPackageOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#makepurchaseresult">MakePurchaseResult</a>&gt;</code>

--------------------


### restorePurchases()

```typescript
restorePurchases() => Promise<{ customerInfo: CustomerInfo; }>
```

Restores a user's previous purchases and links their appUserIDs to any user's also using those purchases.

**Returns:** <code>Promise&lt;{ customerInfo: <a href="#customerinfo">CustomerInfo</a>; }&gt;</code>

--------------------


### recordPurchase(...)

```typescript
recordPurchase(options: { productID: string; }) => Promise<{ transaction: PurchasesStoreTransaction; }>
```

Use this method only if you already have your own IAP implementation using StoreKit 2 and want to use
RevenueCat's backend. If you are using StoreKit 1 for your implementation, you do not need this method.

You only need to use this method with *new* purchases. Subscription updates are observed automatically.

| Param         | Type                                | Description                                                                         |
| ------------- | ----------------------------------- | ----------------------------------------------------------------------------------- |
| **`options`** | <code>{ productID: string; }</code> | The productID that was purchased that needs to be synced with RevenueCat's backend. |

**Returns:** <code>Promise&lt;{ transaction: <a href="#purchasesstoretransaction">PurchasesStoreTransaction</a>; }&gt;</code>

--------------------


### getAppUserID()

```typescript
getAppUserID() => Promise<{ appUserID: string; }>
```

Get the appUserID

**Returns:** <code>Promise&lt;{ appUserID: string; }&gt;</code>

--------------------


### getStorefront()

```typescript
getStorefront() => Promise<Storefront>
```

Gets the storefront for the current store account.

**Returns:** <code>Promise&lt;<a href="#storefront">Storefront</a>&gt;</code>

--------------------


### logIn(...)

```typescript
logIn(options: { appUserID: string; }) => Promise<LogInResult>
```

This function will log in the current user with an appUserID. Typically, this would be used after a log in
to identify a user without calling configure.

| Param         | Type                                | Description                                             |
| ------------- | ----------------------------------- | ------------------------------------------------------- |
| **`options`** | <code>{ appUserID: string; }</code> | The appUserID that should be linked to the current user |

**Returns:** <code>Promise&lt;<a href="#loginresult">LogInResult</a>&gt;</code>

--------------------


### logOut()

```typescript
logOut() => Promise<{ customerInfo: CustomerInfo; }>
```

Logs out the Purchases client clearing the saved appUserID. This will generate a random user id and save it in the cache.

**Returns:** <code>Promise&lt;{ customerInfo: <a href="#customerinfo">CustomerInfo</a>; }&gt;</code>

--------------------


### setLogLevel(...)

```typescript
setLogLevel(options: { level: LOG_LEVEL; }) => Promise<void>
```

Used to set the log level. Useful for debugging issues with the lovely team @RevenueCat.
The default is {<a href="#log_level">LOG_LEVEL.INFO</a>} in release builds and {<a href="#log_level">LOG_LEVEL.DEBUG</a>} in debug builds.

| Param         | Type                                                        | Description                       |
| ------------- | ----------------------------------------------------------- | --------------------------------- |
| **`options`** | <code>{ level: <a href="#log_level">LOG_LEVEL</a>; }</code> | Log level to use to display logs. |

--------------------


### setLogHandler(...)

```typescript
setLogHandler(logHandler: LogHandler) => Promise<void>
```

Set a custom log handler for redirecting logs to your own logging system.
By default, this sends info, warning, and error messages.
If you wish to receive Debug level messages, see [setLogLevel].

| Param            | Type                                              | Description                                                                                             |
| ---------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| **`logHandler`** | <code><a href="#loghandler">LogHandler</a></code> | It will get called for each log event. Use this function to redirect the log to your own logging system |

--------------------


### getCustomerInfo()

```typescript
getCustomerInfo() => Promise<{ customerInfo: CustomerInfo; }>
```

Gets current customer info

**Returns:** <code>Promise&lt;{ customerInfo: <a href="#customerinfo">CustomerInfo</a>; }&gt;</code>

--------------------


### syncPurchases()

```typescript
syncPurchases() => Promise<void>
```

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.

--------------------


### syncObserverModeAmazonPurchase(...)

```typescript
syncObserverModeAmazonPurchase(options: SyncObserverModeAmazonPurchaseOptions) => Promise<void>
```

| Param         | Type                                                                            |
| ------------- | ------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#syncamazonpurchaseoptions">SyncAmazonPurchaseOptions</a></code> |

--------------------


### syncAmazonPurchase(...)

```typescript
syncAmazonPurchase(options: SyncAmazonPurchaseOptions) => Promise<void>
```

This method will send a purchase to the RevenueCat backend. This function should only be called if you are
in Amazon observer mode or performing a client side migration of your current users to RevenueCat.

The receipt IDs are cached if successfully posted, so they are not posted more than once.

| Param         | Type                                                                            |
| ------------- | ------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#syncamazonpurchaseoptions">SyncAmazonPurchaseOptions</a></code> |

--------------------


### enableAdServicesAttributionTokenCollection()

```typescript
enableAdServicesAttributionTokenCollection() => Promise<void>
```

Enable automatic collection of Apple Search Ad attribution on iOS. Disabled by default. Supported in iOS 14.3+ only

--------------------


### isAnonymous()

```typescript
isAnonymous() => Promise<{ isAnonymous: boolean; }>
```

**Returns:** <code>Promise&lt;{ isAnonymous: boolean; }&gt;</code>

--------------------


### checkTrialOrIntroductoryPriceEligibility(...)

```typescript
checkTrialOrIntroductoryPriceEligibility(options: { productIdentifiers: string[]; }) => Promise<{ [productId: string]: IntroEligibility; }>
```

iOS only. Computes whether a user is eligible for the introductory pricing period of a given product.
You should use this method to determine whether you show the user the normal product price or the
introductory price. This also applies to trials (trials are considered a type of introductory pricing).

| Param         | Type                                           | Description                                                            |
| ------------- | ---------------------------------------------- | ---------------------------------------------------------------------- |
| **`options`** | <code>{ productIdentifiers: string[]; }</code> | Array of product identifiers for which you want to compute eligibility |

**Returns:** <code>Promise&lt;{ [productId: string]: <a href="#introeligibility">IntroEligibility</a>; }&gt;</code>

--------------------


### getPromotionalOffer(...)

```typescript
getPromotionalOffer(options: GetPromotionalOfferOptions) => Promise<PurchasesPromotionalOffer | undefined>
```

iOS only. Use this function to retrieve the <a href="#purchasespromotionaloffer">`PurchasesPromotionalOffer`</a> for a given <a href="#purchasespackage">`PurchasesPackage`</a>.

| Param         | Type                                                                              |
| ------------- | --------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#getpromotionalofferoptions">GetPromotionalOfferOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#purchasespromotionaloffer">PurchasesPromotionalOffer</a>&gt;</code>

--------------------


### getEligibleWinBackOffersForProduct(...)

```typescript
getEligibleWinBackOffersForProduct(options: GetEligibleWinBackOffersForProductOptions) => Promise<{ eligibleWinBackOffers: PurchasesWinBackOffer[]; }>
```

iOS only, requires iOS 18.0 or greater with StoreKit 2. Use this function to retrieve
the eligible `PurchasesWinBackOffer`s that a subscriber is eligible for for a
given <a href="#purchasesstoreproduct">`PurchasesStoreProduct`</a>.

| Param         | Type                                                                                                            |
| ------------- | --------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#geteligiblewinbackoffersforproductoptions">GetEligibleWinBackOffersForProductOptions</a></code> |

**Returns:** <code>Promise&lt;{ eligibleWinBackOffers: PurchasesWinBackOffer[]; }&gt;</code>

--------------------


### getEligibleWinBackOffersForPackage(...)

```typescript
getEligibleWinBackOffersForPackage(options: GetEligibleWinBackOffersForPackageOptions) => Promise<{ eligibleWinBackOffers: PurchasesWinBackOffer[]; }>
```

iOS only, requires iOS 18.0 or greater with StoreKit 2. Use this function to retrieve
the eligible `PurchasesWinBackOffer`s that a subscriber is eligible for for a
given `PurchasesStorePackage`.

| Param         | Type                                                                                                            |
| ------------- | --------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#geteligiblewinbackoffersforpackageoptions">GetEligibleWinBackOffersForPackageOptions</a></code> |

**Returns:** <code>Promise&lt;{ eligibleWinBackOffers: PurchasesWinBackOffer[]; }&gt;</code>

--------------------


### purchaseProductWithWinBackOffer(...)

```typescript
purchaseProductWithWinBackOffer(options: PurchaseProductWithWinBackOfferOptions) => Promise<MakePurchaseResult | undefined>
```

iOS only, requires iOS 18.0 or greater with StoreKit 2. Purchase a product applying a given win-back offer.

| Param         | Type                                                                                                      |
| ------------- | --------------------------------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#purchaseproductwithwinbackofferoptions">PurchaseProductWithWinBackOfferOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#makepurchaseresult">MakePurchaseResult</a>&gt;</code>

--------------------


### purchasePackageWithWinBackOffer(...)

```typescript
purchasePackageWithWinBackOffer(options: PurchasePackageWithWinBackOfferOptions) => Promise<MakePurchaseResult | undefined>
```

iOS only, requires iOS 18.0 or greater with StoreKit 2. Purchase a package applying a given win-back offer.

| Param         | Type                                                                                                      |
| ------------- | --------------------------------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#purchasepackagewithwinbackofferoptions">PurchasePackageWithWinBackOfferOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#makepurchaseresult">MakePurchaseResult</a>&gt;</code>

--------------------


### invalidateCustomerInfoCache()

```typescript
invalidateCustomerInfoCache() => Promise<void>
```

Invalidates the cache for customer information.

Most apps will not need to use this method; invalidating the cache can leave your app in an invalid state.
Refer to https://docs.revenuecat.com/docs/customer-info#section-get-user-information for more information on
using the cache properly.

This is useful for cases where customer information might have been updated outside the app, like if a
promotional subscription is granted through the RevenueCat dashboard.

--------------------


### presentCodeRedemptionSheet()

```typescript
presentCodeRedemptionSheet() => Promise<void>
```

iOS 14.0+ only. Presents a code redemption sheet, useful for redeeming offer codes
Refer to https://docs.revenuecat.com/docs/ios-subscription-offers#offer-codes for more information on how
to configure and use offer codes

--------------------


### setAttributes(...)

```typescript
setAttributes(attributes: { [key: string]: string | null; }) => Promise<void>
```

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.

Key names starting with "$" are reserved names used by RevenueCat. For a full list of key
restrictions refer to our guide: https://docs.revenuecat.com/docs/subscriber-attributes

| Param            | Type                                            | Description                                                                        |
| ---------------- | ----------------------------------------------- | ---------------------------------------------------------------------------------- |
| **`attributes`** | <code>{ [key: string]: string \| null; }</code> | Map of attributes by key. Set the value as an empty string to delete an attribute. |

--------------------


### setEmail(...)

```typescript
setEmail(options: { email: string | null; }) => Promise<void>
```

Subscriber attribute associated with the email address for the user

| Param         | Type                                    | Description                                                |
| ------------- | --------------------------------------- | ---------------------------------------------------------- |
| **`options`** | <code>{ email: string \| null; }</code> | Empty String or null will delete the subscriber attribute. |

--------------------


### setPhoneNumber(...)

```typescript
setPhoneNumber(options: { phoneNumber: string | null; }) => Promise<void>
```

Subscriber attribute associated with the phone number for the user

| Param         | Type                                          | Description                                                |
| ------------- | --------------------------------------------- | ---------------------------------------------------------- |
| **`options`** | <code>{ phoneNumber: string \| null; }</code> | Empty String or null will delete the subscriber attribute. |

--------------------


### setDisplayName(...)

```typescript
setDisplayName(options: { displayName: string | null; }) => Promise<void>
```

Subscriber attribute associated with the display name for the user

| Param         | Type                                          | Description                                                |
| ------------- | --------------------------------------------- | ---------------------------------------------------------- |
| **`options`** | <code>{ displayName: string \| null; }</code> | Empty String or null will delete the subscriber attribute. |

--------------------


### setPushToken(...)

```typescript
setPushToken(options: { pushToken: string | null; }) => Promise<void>
```

Subscriber attribute associated with the push token for the user

| Param         | Type                                        | Description                                |
| ------------- | ------------------------------------------- | ------------------------------------------ |
| **`options`** | <code>{ pushToken: string \| null; }</code> | null will delete the subscriber attribute. |

--------------------


### setProxyURL(...)

```typescript
setProxyURL(options: { url: string; }) => Promise<void>
```

Set this property to your proxy URL before configuring Purchases *only* if you've received a proxy key value
from your RevenueCat contact.

| Param         | Type                          |
| ------------- | ----------------------------- |
| **`options`** | <code>{ url: string; }</code> |

--------------------


### collectDeviceIdentifiers()

```typescript
collectDeviceIdentifiers() => Promise<void>
```

Automatically collect subscriber attributes associated with the device identifiers.
$idfa, $idfv, $ip on iOS
$gpsAdId, $androidId, $ip on Android

--------------------


### setAdjustID(...)

```typescript
setAdjustID(options: { adjustID: string | null; }) => Promise<void>
```

Subscriber attribute associated with the Adjust ID for the user
Required for the RevenueCat Adjust integration

| Param         | Type                                       | Description                                                                                        |
| ------------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ adjustID: string \| null; }</code> | Adjust ID to use in Adjust integration. Empty String or null will delete the subscriber attribute. |

--------------------


### setAppsflyerID(...)

```typescript
setAppsflyerID(options: { appsflyerID: string | null; }) => Promise<void>
```

Subscriber attribute associated with the AppsFlyer ID for the user
Required for the RevenueCat AppsFlyer integration

| Param         | Type                                          | Description                                                                                              |
| ------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ appsflyerID: string \| null; }</code> | Appsflyer ID to use in Appsflyer integration. Empty String or null will delete the subscriber attribute. |

--------------------


### setFBAnonymousID(...)

```typescript
setFBAnonymousID(options: { fbAnonymousID: string | null; }) => Promise<void>
```

Subscriber attribute associated with the Facebook SDK Anonymous ID for the user
Recommended for the RevenueCat Facebook integration

| Param         | Type                                            | Description                                                                                                       |
| ------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ fbAnonymousID: string \| null; }</code> | Facebook Anonymous ID to use in Mparticle integration. Empty String or null will delete the subscriber attribute. |

--------------------


### setMparticleID(...)

```typescript
setMparticleID(options: { mparticleID: string | null; }) => Promise<void>
```

Subscriber attribute associated with the mParticle ID for the user
Recommended for the RevenueCat mParticle integration

| Param         | Type                                          | Description                                                                                              |
| ------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ mparticleID: string \| null; }</code> | Mparticle ID to use in Mparticle integration. Empty String or null will delete the subscriber attribute. |

--------------------


### setCleverTapID(...)

```typescript
setCleverTapID(options: { cleverTapID: string | null; }) => Promise<void>
```

Subscriber attribute associated with the CleverTap ID for the user
Required for the RevenueCat CleverTap integration

| Param         | Type                                          | Description                                                                                                   |
| ------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ cleverTapID: string \| null; }</code> | CleverTap user ID to use in CleverTap integration. Empty String or null will delete the subscriber attribute. |

--------------------


### setMixpanelDistinctID(...)

```typescript
setMixpanelDistinctID(options: { mixpanelDistinctID: string | null; }) => Promise<void>
```

Subscriber attribute associated with the Mixpanel Distinct ID for the user
Required for the RevenueCat Mixpanel integration

| Param         | Type                                                 | Description                                                                                                     |
| ------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ mixpanelDistinctID: string \| null; }</code> | Mixpanel Distinct ID to use in Mixpanel integration. Empty String or null will delete the subscriber attribute. |

--------------------


### setFirebaseAppInstanceID(...)

```typescript
setFirebaseAppInstanceID(options: { firebaseAppInstanceID: string | null; }) => Promise<void>
```

Subscriber attribute associated with the Firebase App Instance ID for the user
Required for the RevenueCat Firebase integration

| Param         | Type                                                    | Description                                                                                                         |
| ------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ firebaseAppInstanceID: string \| null; }</code> | Firebase App Instance ID to use in Firebase integration. Empty String or null will delete the subscriber attribute. |

--------------------


### setOnesignalID(...)

```typescript
setOnesignalID(options: { onesignalID: string | null; }) => Promise<void>
```

Subscriber attribute associated with the OneSignal Player ID for the user
Required for the RevenueCat OneSignal integration. Deprecated for OneSignal versions above v9.0.

| Param         | Type                                          | Description                                                                                                     |
| ------------- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ onesignalID: string \| null; }</code> | OneSignal Player ID to use in OneSignal integration. Empty String or null will delete the subscriber attribute. |

--------------------


### setOnesignalUserID(...)

```typescript
setOnesignalUserID(options: { onesignalUserID: string | null; }) => Promise<void>
```

Subscriber attribute associated with the OneSignal User ID for the user
Required for the RevenueCat OneSignal integration with versions v11.0 and above.

| Param         | Type                                              | Description                                                                                                  |
| ------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| **`options`** | <code>{ onesignalUserID: string \| null; }</code> | OneSignal UserId to use in OneSignal integration. Empty String or null will delete the subscriber attribute. |

--------------------


### setAirshipChannelID(...)

```typescript
setAirshipChannelID(options: { airshipChannelID: string | null; }) => Promise<void>
```

Subscriber attribute associated with the Airship Channel ID for the user
Required for the RevenueCat Airship integration

| Param         | Type                                               | Description                                                                                                  |
| ------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| **`options`** | <code>{ airshipChannelID: string \| null; }</code> | Airship Channel ID to use in Airship integration. Empty String or null will delete the subscriber attribute. |

--------------------


### setMediaSource(...)

```typescript
setMediaSource(options: { mediaSource: string | null; }) => Promise<void>
```

Subscriber attribute associated with the install media source for the user

| Param         | Type                                          | Description                                                |
| ------------- | --------------------------------------------- | ---------------------------------------------------------- |
| **`options`** | <code>{ mediaSource: string \| null; }</code> | Empty String or null will delete the subscriber attribute. |

--------------------


### setCampaign(...)

```typescript
setCampaign(options: { campaign: string | null; }) => Promise<void>
```

Subscriber attribute associated with the install campaign for the user

| Param         | Type                                       | Description                                                |
| ------------- | ------------------------------------------ | ---------------------------------------------------------- |
| **`options`** | <code>{ campaign: string \| null; }</code> | Empty String or null will delete the subscriber attribute. |

--------------------


### setAdGroup(...)

```typescript
setAdGroup(options: { adGroup: string | null; }) => Promise<void>
```

Subscriber attribute associated with the install ad group for the user

| Param         | Type                                      | Description                                                |
| ------------- | ----------------------------------------- | ---------------------------------------------------------- |
| **`options`** | <code>{ adGroup: string \| null; }</code> | Empty String or null will delete the subscriber attribute. |

--------------------


### setAd(...)

```typescript
setAd(options: { ad: string | null; }) => Promise<void>
```

Subscriber attribute associated with the install ad for the user

| Param         | Type                                 | Description                                                |
| ------------- | ------------------------------------ | ---------------------------------------------------------- |
| **`options`** | <code>{ ad: string \| null; }</code> | Empty String or null will delete the subscriber attribute. |

--------------------


### setKeyword(...)

```typescript
setKeyword(options: { keyword: string | null; }) => Promise<void>
```

Subscriber attribute associated with the install keyword for the user

| Param         | Type                                      | Description                                                |
| ------------- | ----------------------------------------- | ---------------------------------------------------------- |
| **`options`** | <code>{ keyword: string \| null; }</code> | Empty String or null will delete the subscriber attribute. |

--------------------


### setCreative(...)

```typescript
setCreative(options: { creative: string | null; }) => Promise<void>
```

Subscriber attribute associated with the install ad creative for the user

| Param         | Type                                       | Description                                                |
| ------------- | ------------------------------------------ | ---------------------------------------------------------- |
| **`options`** | <code>{ creative: string \| null; }</code> | Empty String or null will delete the subscriber attribute. |

--------------------


### canMakePayments(...)

```typescript
canMakePayments(options?: { features?: BILLING_FEATURE[] | undefined; } | undefined) => Promise<{ canMakePayments: boolean; }>
```

Check if billing is supported for the current user (meaning IN-APP purchases are supported)
and optionally, whether a list of specified feature types are supported.

Note: Billing features are only relevant to Google Play Android users.
For other stores and platforms, billing features won't be checked.

| Param         | Type                                           | Description                                                                                                                                                                   |
| ------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ features?: BILLING_FEATURE[]; }</code> | An array of feature types to check for support. Feature types must be one of [BILLING_FEATURE]. By default, is an empty list and no specific feature support will be checked. |

**Returns:** <code>Promise&lt;{ canMakePayments: boolean; }&gt;</code>

--------------------


### beginRefundRequestForActiveEntitlement()

```typescript
beginRefundRequestForActiveEntitlement() => Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS; }>
```

iOS 15+ only. Presents a refund request sheet in the current window scene for
the latest transaction associated with the active entitlement.

If the request was unsuccessful, no active entitlements could be found for
the user, or multiple active entitlements were found for the user,
the promise will return an error.
If called in an unsupported platform (Android or iOS &lt; 15), an `UnsupportedPlatformException` will be thrown.

Important: This method should only be used if your user can only have a single active entitlement at a given time.
If a user could have more than one entitlement at a time, use `beginRefundRequestForEntitlement` instead.

**Returns:** <code>Promise&lt;{ refundRequestStatus: <a href="#refund_request_status">REFUND_REQUEST_STATUS</a>; }&gt;</code>

--------------------


### beginRefundRequestForEntitlement(...)

```typescript
beginRefundRequestForEntitlement(options: { entitlementInfo: PurchasesEntitlementInfo; }) => Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS; }>
```

iOS 15+ only. Presents a refund request sheet in the current window scene for
the latest transaction associated with the `entitlement`.

If the request was unsuccessful, the promise will return an error.
If called in an unsupported platform (Android or iOS &lt; 15), an `UnsupportedPlatformException` will be thrown.

| Param         | Type                                                                                                | Description                                    |
| ------------- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| **`options`** | <code>{ entitlementInfo: <a href="#purchasesentitlementinfo">PurchasesEntitlementInfo</a>; }</code> | The entitlement to begin a refund request for. |

**Returns:** <code>Promise&lt;{ refundRequestStatus: <a href="#refund_request_status">REFUND_REQUEST_STATUS</a>; }&gt;</code>

--------------------


### beginRefundRequestForProduct(...)

```typescript
beginRefundRequestForProduct(options: { storeProduct: PurchasesStoreProduct; }) => Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS; }>
```

iOS 15+ only. Presents a refund request sheet in the current window scene for
the latest transaction associated with the `product`.

If the request was unsuccessful, the promise will return an error.
If called in an unsupported platform (Android or iOS &lt; 15), an `UnsupportedPlatformException` will be thrown.

| Param         | Type                                                                                       | Description                                     |
| ------------- | ------------------------------------------------------------------------------------------ | ----------------------------------------------- |
| **`options`** | <code>{ storeProduct: <a href="#purchasesstoreproduct">PurchasesStoreProduct</a>; }</code> | The StoreProduct to begin a refund request for. |

**Returns:** <code>Promise&lt;{ refundRequestStatus: <a href="#refund_request_status">REFUND_REQUEST_STATUS</a>; }&gt;</code>

--------------------


### showInAppMessages(...)

```typescript
showInAppMessages(options?: { messageTypes?: IN_APP_MESSAGE_TYPE[] | undefined; } | undefined) => Promise<void>
```

Shows in-app messages available from the App <a href="#store">Store</a> or Google Play. You need to disable messages from showing
automatically using [PurchasesConfiguration.shouldShowInAppMessagesAutomatically].

Note: In iOS, this requires version 16+. In older versions the promise will be resolved successfully
immediately.

| Param         | Type                                                   | Description                                                                                                                                                                       |
| ------------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ messageTypes?: IN_APP_MESSAGE_TYPE[]; }</code> | An array of message types that the stores can display inside your app. Values must be one of [IN_APP_MESSAGE_TYPE]. By default, is undefined and all message types will be shown. |

--------------------


### isConfigured()

```typescript
isConfigured() => Promise<{ isConfigured: boolean; }>
```

Check if configure has finished and Purchases has been configured.

**Returns:** <code>Promise&lt;{ isConfigured: boolean; }&gt;</code>

--------------------


### overridePreferredUILocale(...)

```typescript
overridePreferredUILocale(options: { locale: string | null; }) => Promise<void>
```

Override the preferred UI locale for RevenueCat UI components at runtime. This affects both API requests
and UI rendering. If the locale changes, this will automatically clear the offerings cache and trigger
a background refetch to get paywall templates with the correct localizations.

| Param         | Type                                     | Description                                                               |
| ------------- | ---------------------------------------- | ------------------------------------------------------------------------- |
| **`options`** | <code>{ locale: string \| null; }</code> | The locale string (e.g., "es-ES", "en-US") or null to use system default. |

--------------------


### trackCustomPaywallImpression(...)

```typescript
trackCustomPaywallImpression(options?: TrackCustomPaywallImpressionOptions | undefined) => Promise<void>
```

Tracks an impression of a custom paywall. Use this to record when a user views your custom paywall
so that RevenueCat can track paywall analytics.

Call this method once per paywall display, ideally when the paywall first becomes visible to the user,
not in callbacks that may fire multiple times for the same display.

| Param         | Type                                                                                                | Description                                                                                      |
| ------------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| **`options`** | <code><a href="#trackcustompaywallimpressionoptions">TrackCustomPaywallImpressionOptions</a></code> | Optional parameters for the impression. Include `paywallId` to identify which paywall was shown. |

--------------------


### Interfaces


#### PurchasesConfiguration

Holds parameters to initialize the SDK.

| Prop                                             | Type                                                                                    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------------------ | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **`apiKey`**                                     | <code>string</code>                                                                     | RevenueCat API Key. Needs to be a string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **`appUserID`**                                  | <code>string \| null</code>                                                             | A unique id for identifying the user                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **`purchasesAreCompletedBy`**                    | <code><a href="#purchasesarecompletedby">PurchasesAreCompletedBy</a></code>             | Set this to MY_APP and provide a <a href="#storekit_version">STOREKIT_VERSION</a> if you have your own IAP implementation and want to only use RevenueCat's backend. Defaults to <a href="#purchases_are_completed_by_type">PURCHASES_ARE_COMPLETED_BY_TYPE.REVENUECAT</a>. If you are on Android and setting this to MY_APP, will have to acknowledge the purchases yourself. If your app is only on Android, you may specify any StoreKit version, as it is ignored by the Android SDK.                                                                                                              |
| **`userDefaultsSuiteName`**                      | <code>string</code>                                                                     | An optional string. iOS-only, will be ignored for Android. Set this if you would like the RevenueCat SDK to store its preferences in a different NSUserDefaults suite, otherwise it will use standardUserDefaults. Default is null, which will make the SDK use standardUserDefaults.                                                                                                                                                                                                                                                                                                                  |
| **`storeKitVersion`**                            | <code><a href="#storekit_version">STOREKIT_VERSION</a></code>                           | iOS-only, will be ignored for Android. By selecting the DEFAULT value, RevenueCat will automatically select the most appropriate StoreKit version for the app's runtime environment. - Warning: Make sure you have an In-App Purchase Key configured in your app. Please see https://rev.cat/in-app-purchase-key-configuration for more info. - Note: StoreKit 2 is only available on iOS 16+. StoreKit 1 will be used for previous iOS versions regardless of this setting.                                                                                                                           |
| **`useAmazon`**                                  | <code>boolean</code>                                                                    | An optional boolean. Android only. Required to configure the plugin to be used in the Amazon Appstore.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **`shouldShowInAppMessagesAutomatically`**       | <code>boolean</code>                                                                    | Whether we should show store in-app messages automatically. Both Google Play and the App <a href="#store">Store</a> provide in-app messages for some situations like billing issues. By default, those messages will be shown automatically. This allows to disable that behavior, so you can display those messages at your convenience. For more information, check: https://rev.cat/storekit-message and https://rev.cat/googleplayinappmessaging                                                                                                                                                   |
| **`entitlementVerificationMode`**                | <code><a href="#entitlement_verification_mode">ENTITLEMENT_VERIFICATION_MODE</a></code> | Verification strictness levels for [EntitlementInfo]. See https://rev.cat/trusted-entitlements for more info.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **`pendingTransactionsForPrepaidPlansEnabled`**  | <code>boolean</code>                                                                    | Enable this setting if you want to allow pending purchases for prepaid subscriptions (only supported in Google Play). Note that entitlements are not granted until payment is done. Disabled by default.