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:
Sign up to get started for free.
@revenuecat/purchases-capacitor is the client for the RevenueCat 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 | |
---|---|
✅ | Server-side receipt validation |
➡️ | 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 up to date |
🔀 | Integrations - over a dozen integrations to easily send purchase data where you need it |
💯 | Well maintained - frequent releases |
📮 | Great support - Help Center |
For more detailed information, you can view our complete documentation at docs.revenuecat.com.
Please follow the Quickstart Guide for more information on how to install the SDK.
npm install @revenuecat/purchases-capacitor
npx cap sync
Contributions are always welcome! To learn how you can contribute, please see the Contributing Guide.
This plugin is based on CapGo's Capacitor plugin. The plugin was transferred to RevenueCat to become an officially supported plugin.
PurchasesConfiguration
| RevenueCat configuration object including the API key and other optional parameters. See {@link PurchasesConfiguration} |
--------------------
### setMockWebResults(...)
```typescript
setMockWebResults(options: { shouldMockWebResults: boolean; }) => Promise{ shouldMockWebResults: boolean; }
| Set shouldMockWebResults to true if you want the plugin methods to return mocked values |
--------------------
### setSimulatesAskToBuyInSandbox(...)
```typescript
setSimulatesAskToBuyInSandbox(options: { simulatesAskToBuyInSandbox: boolean; }) => Promise{ simulatesAskToBuyInSandbox: boolean; }
| 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) => PromiseCustomerInfoUpdateListener
| CustomerInfo update listener |
**Returns:** Promise<string>
--------------------
### removeCustomerInfoUpdateListener(...)
```typescript
removeCustomerInfoUpdateListener(options: { listenerToRemove: PurchasesCallbackId; }) => Promise<{ wasRemoved: boolean; }>
```
Removes a given CustomerInfoUpdateListener
| Param | Type | Description |
| ------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------- |
| **`options`** | { listenerToRemove: string; }
| Include listenerToRemove, which is a CustomerInfoUpdateListener reference of the listener to remove |
**Returns:** Promise<{ wasRemoved: boolean; }>
--------------------
### getOfferings()
```typescript
getOfferings() => PromisePromise<PurchasesOfferings>
--------------------
### getCurrentOfferingForPlacement(...)
```typescript
getCurrentOfferingForPlacement(options: { placementIdentifier: string; }) => Promise{ placementIdentifier: string; }
|
**Returns:** Promise<PurchasesOffering | null>
--------------------
### syncAttributesAndOfferingsIfNeeded()
```typescript
syncAttributesAndOfferingsIfNeeded() => PromisePromise<PurchasesOfferings>
--------------------
### getProducts(...)
```typescript
getProducts(options: GetProductOptions) => Promise<{ products: PurchasesStoreProduct[]; }>
```
Fetch the product info
| Param | Type |
| ------------- | --------------------------------------------------------------- |
| **`options`** | GetProductOptions
|
**Returns:** Promise<{ products: PurchasesStoreProduct[]; }>
--------------------
### purchaseStoreProduct(...)
```typescript
purchaseStoreProduct(options: PurchaseStoreProductOptions) => PromisePurchaseStoreProductOptions
|
**Returns:** Promise<MakePurchaseResult>
--------------------
### purchaseDiscountedProduct(...)
```typescript
purchaseDiscountedProduct(options: PurchaseDiscountedProductOptions) => PromisePurchaseDiscountedProductOptions
|
**Returns:** Promise<MakePurchaseResult>
--------------------
### purchasePackage(...)
```typescript
purchasePackage(options: PurchasePackageOptions) => PromisePurchasePackageOptions
|
**Returns:** Promise<MakePurchaseResult>
--------------------
### purchaseSubscriptionOption(...)
```typescript
purchaseSubscriptionOption(options: PurchaseSubscriptionOptionOptions) => PromisePurchaseSubscriptionOptionOptions
|
**Returns:** Promise<MakePurchaseResult>
--------------------
### purchaseDiscountedPackage(...)
```typescript
purchaseDiscountedPackage(options: PurchaseDiscountedPackageOptions) => PromisePurchaseDiscountedPackageOptions
|
**Returns:** Promise<MakePurchaseResult>
--------------------
### 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:** Promise<{ customerInfo: CustomerInfo; }>
--------------------
### 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`** | { productID: string; }
| The productID that was purchased that needs to be synced with RevenueCat's backend. |
**Returns:** Promise<{ transaction: PurchasesStoreTransaction; }>
--------------------
### getAppUserID()
```typescript
getAppUserID() => Promise<{ appUserID: string; }>
```
Get the appUserID
**Returns:** Promise<{ appUserID: string; }>
--------------------
### logIn(...)
```typescript
logIn(options: { appUserID: string; }) => Promise{ appUserID: string; }
| The appUserID that should be linked to the current user |
**Returns:** Promise<LogInResult>
--------------------
### 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:** Promise<{ customerInfo: CustomerInfo; }>
--------------------
### setLogLevel(...)
```typescript
setLogLevel(options: { level: LOG_LEVEL; }) => Promise{ level: LOG_LEVEL; }
| Log level to use to display logs. |
--------------------
### setLogHandler(...)
```typescript
setLogHandler(logHandler: LogHandler) => PromiseLogHandler
| 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:** Promise<{ customerInfo: CustomerInfo; }>
--------------------
### syncPurchases()
```typescript
syncPurchases() => PromiseSyncAmazonPurchaseOptions
|
--------------------
### syncAmazonPurchase(...)
```typescript
syncAmazonPurchase(options: SyncAmazonPurchaseOptions) => PromiseSyncAmazonPurchaseOptions
|
--------------------
### enableAdServicesAttributionTokenCollection()
```typescript
enableAdServicesAttributionTokenCollection() => PromisePromise<{ isAnonymous: boolean; }>
--------------------
### 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`** | { productIdentifiers: string[]; }
| Array of product identifiers for which you want to compute eligibility |
**Returns:** Promise<{ [productId: string]: IntroEligibility; }>
--------------------
### getPromotionalOffer(...)
```typescript
getPromotionalOffer(options: GetPromotionalOfferOptions) => PromiseGetPromotionalOfferOptions
|
**Returns:** Promise<PurchasesPromotionalOffer>
--------------------
### invalidateCustomerInfoCache()
```typescript
invalidateCustomerInfoCache() => Promise{ [key: string]: string \| null; }
| Map of attributes by key. Set the value as an empty string to delete an attribute. |
--------------------
### setEmail(...)
```typescript
setEmail(options: { email: string | null; }) => Promise{ email: string \| null; }
| Empty String or null will delete the subscriber attribute. |
--------------------
### setPhoneNumber(...)
```typescript
setPhoneNumber(options: { phoneNumber: string | null; }) => Promise{ phoneNumber: string \| null; }
| Empty String or null will delete the subscriber attribute. |
--------------------
### setDisplayName(...)
```typescript
setDisplayName(options: { displayName: string | null; }) => Promise{ displayName: string \| null; }
| Empty String or null will delete the subscriber attribute. |
--------------------
### setPushToken(...)
```typescript
setPushToken(options: { pushToken: string | null; }) => Promise{ pushToken: string \| null; }
| null will delete the subscriber attribute. |
--------------------
### setProxyURL(...)
```typescript
setProxyURL(options: { url: string; }) => Promise{ url: string; }
|
--------------------
### collectDeviceIdentifiers()
```typescript
collectDeviceIdentifiers() => Promise{ adjustID: string \| null; }
| Adjust ID to use in Adjust integration. Empty String or null will delete the subscriber attribute. |
--------------------
### setAppsflyerID(...)
```typescript
setAppsflyerID(options: { appsflyerID: string | null; }) => Promise{ appsflyerID: string \| null; }
| Appsflyer ID to use in Appsflyer integration. Empty String or null will delete the subscriber attribute. |
--------------------
### setFBAnonymousID(...)
```typescript
setFBAnonymousID(options: { fbAnonymousID: string | null; }) => Promise{ fbAnonymousID: string \| null; }
| 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{ mparticleID: string \| null; }
| Mparticle ID to use in Mparticle integration. Empty String or null will delete the subscriber attribute. |
--------------------
### setCleverTapID(...)
```typescript
setCleverTapID(options: { cleverTapID: string | null; }) => Promise{ cleverTapID: string \| null; }
| 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{ mixpanelDistinctID: string \| null; }
| 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{ firebaseAppInstanceID: string \| null; }
| 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{ onesignalID: string \| null; }
| 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{ onesignalUserID: string \| null; }
| OneSignal UserId to use in OneSignal integration. Empty String or null will delete the subscriber attribute. |
--------------------
### setAirshipChannelID(...)
```typescript
setAirshipChannelID(options: { airshipChannelID: string | null; }) => Promise{ airshipChannelID: string \| null; }
| 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{ mediaSource: string \| null; }
| Empty String or null will delete the subscriber attribute. |
--------------------
### setCampaign(...)
```typescript
setCampaign(options: { campaign: string | null; }) => Promise{ campaign: string \| null; }
| Empty String or null will delete the subscriber attribute. |
--------------------
### setAdGroup(...)
```typescript
setAdGroup(options: { adGroup: string | null; }) => Promise{ adGroup: string \| null; }
| Empty String or null will delete the subscriber attribute. |
--------------------
### setAd(...)
```typescript
setAd(options: { ad: string | null; }) => Promise{ ad: string \| null; }
| Empty String or null will delete the subscriber attribute. |
--------------------
### setKeyword(...)
```typescript
setKeyword(options: { keyword: string | null; }) => Promise{ keyword: string \| null; }
| Empty String or null will delete the subscriber attribute. |
--------------------
### setCreative(...)
```typescript
setCreative(options: { creative: string | null; }) => Promise{ creative: string \| null; }
| 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`** | { features?: BILLING_FEATURE[]; }
| 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:** Promise<{ canMakePayments: boolean; }>
--------------------
### 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 < 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:** Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS; }>
--------------------
### 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 < 15), an `UnsupportedPlatformException` will be thrown.
| Param | Type | Description |
| ------------- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| **`options`** | { entitlementInfo: PurchasesEntitlementInfo; }
| The entitlement to begin a refund request for. |
**Returns:** Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS; }>
--------------------
### 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 < 15), an `UnsupportedPlatformException` will be thrown.
| Param | Type | Description |
| ------------- | ------------------------------------------------------------------------------------------ | ----------------------------------------------- |
| **`options`** | { storeProduct: PurchasesStoreProduct; }
| The StoreProduct to begin a refund request for. |
**Returns:** Promise<{ refundRequestStatus: REFUND_REQUEST_STATUS; }>
--------------------
### showInAppMessages(...)
```typescript
showInAppMessages(options?: { messageTypes?: IN_APP_MESSAGE_TYPE[] | undefined; } | undefined) => Promise{ messageTypes?: IN_APP_MESSAGE_TYPE[]; }
| 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:** Promise<{ isConfigured: boolean; }>
--------------------
### Interfaces
#### PurchasesConfiguration
Holds parameters to initialize the SDK.
| Prop | Type | Description |
| ----------------------------------------------- | --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`apiKey`** | string
| RevenueCat API Key. Needs to be a string |
| **`appUserID`** | string \| null
| A unique id for identifying the user |
| **`purchasesAreCompletedBy`** | PurchasesAreCompletedBy
| Set this to MY_APP and provide a STOREKIT_VERSION if you have your own IAP implementation and want to only use RevenueCat's backend. Defaults to PURCHASES_ARE_COMPLETED_BY_TYPE.REVENUECAT. 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`** | string
| 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`** | STOREKIT_VERSION
| 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`** | boolean
| An optional boolean. Android only. Required to configure the plugin to be used in the Amazon Appstore. |
| **`shouldShowInAppMessagesAutomatically`** | boolean
| Whether we should show store in-app messages automatically. Both Google Play and the App Store 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`** | ENTITLEMENT_VERIFICATION_MODE
| Verification strictness levels for [EntitlementInfo]. See https://rev.cat/trusted-entitlements for more info. |
| **`pendingTransactionsForPrepaidPlansEnabled`** | boolean
| 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. |
#### CustomerInfo
Type containing all information regarding the customer
| Prop | Type | Description |
| ------------------------------------ | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **`entitlements`** | PurchasesEntitlementInfos
| Entitlements attached to this customer info |
| **`activeSubscriptions`** | string[]
| Set of active subscription skus |
| **`allPurchasedProductIdentifiers`** | string[]
| Set of purchased skus, active and inactive |
| **`latestExpirationDate`** | string \| null
| The latest expiration date of all purchased skus |
| **`firstSeen`** | string
| The date this user was first seen in RevenueCat. |
| **`originalAppUserId`** | string
| The original App User Id recorded for this user. |
| **`requestDate`** | string
| Date when this info was requested |
| **`allExpirationDates`** | { [key: string]: string \| null; }
| Map of skus to expiration dates |
| **`allPurchaseDates`** | { [key: string]: string \| null; }
| Map of skus to purchase dates |
| **`originalApplicationVersion`** | string \| null
| Returns the version number for the version of the application when the user bought the app. Use this for grandfathering users when migrating to subscriptions. This corresponds to the value of CFBundleVersion (in iOS) in the Info.plist file when the purchase was originally made. This is always null in Android |
| **`originalPurchaseDate`** | string \| null
| Returns the purchase date for the version of the application when the user bought the app. Use this for grandfathering users when migrating to subscriptions. |
| **`managementURL`** | string \| null
| URL to manage the active subscription of the user. If this user has an active iOS subscription, this will point to the App Store, if the user has an active Play Store subscription it will point there. If there are no active subscriptions it will be null. If there are multiple for different platforms, it will point to the device store. |
| **`nonSubscriptionTransactions`** | PurchasesStoreTransaction[]
| List of all non subscription transactions. Use this to fetch the history of non-subscription purchases |
#### PurchasesEntitlementInfos
Contains all the entitlements associated to the user.
| Prop | Type | Description |
| ------------------ | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`all`** | { [key: string]: PurchasesEntitlementInfo; }
| Map of all EntitlementInfo (`PurchasesEntitlementInfo`) objects (active and inactive) keyed by entitlement identifier. |
| **`active`** | { [key: string]: PurchasesEntitlementInfo; }
| Map of active EntitlementInfo (`PurchasesEntitlementInfo`) objects keyed by entitlement identifier. |
| **`verification`** | VERIFICATION_RESULT
| If entitlement verification was enabled, the result of that verification. If not, VerificationResult.NOT_REQUESTED |
#### PurchasesEntitlementInfo
The EntitlementInfo object gives you access to all of the information about the status of a user entitlement.
| Prop | Type | Description |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`identifier`** | string
| The entitlement identifier configured in the RevenueCat dashboard |
| **`isActive`** | boolean
| True if the user has access to this entitlement |
| **`willRenew`** | boolean
| True if the underlying subscription is set to renew at the end of the billing period (expirationDate). |
| **`periodType`** | string
| The last period type this entitlement was in. Either: NORMAL, INTRO, TRIAL. |
| **`latestPurchaseDate`** | string
| The latest purchase or renewal date for the entitlement in ISO8601 format. |
| **`latestPurchaseDateMillis`** | number
| The latest purchase or renewal date for the entitlement in milliseconds. |
| **`originalPurchaseDate`** | string
| The first date this entitlement was purchased in ISO8601 format. |
| **`originalPurchaseDateMillis`** | number
| The first date this entitlement was purchased in milliseconds. |
| **`expirationDate`** | string \| null
| The expiration date for the entitlement in ISO8601, can be `null` for lifetime access. If the `periodType` is `trial`, this is the trial expiration date. |
| **`expirationDateMillis`** | number \| null
| The expiration date for the entitlement in milliseconds, can be `null` for lifetime access. If the `periodType` is `trial`, this is the trial expiration date. |
| **`store`** | 'PLAY_STORE' \| 'APP_STORE' \| 'STRIPE' \| 'MAC_APP_STORE' \| 'PROMOTIONAL' \| 'AMAZON' \| 'RC_BILLING' \| 'EXTERNAL' \| 'UNKNOWN_STORE'
| The store where this entitlement was unlocked from. |
| **`productIdentifier`** | string
| The product identifier that unlocked this entitlement |
| **`productPlanIdentifier`** | string \| null
| The product plan identifier that unlocked this entitlement. Android subscriptions only, null on consumables and iOS. |
| **`isSandbox`** | boolean
| False if this entitlement is unlocked via a production purchase |
| **`unsubscribeDetectedAt`** | string \| null
| The date an unsubscribe was detected in ISO8601 format. Can be `null`. Entitlement may still be active even if user has unsubscribed. Check the `isActive` property. |
| **`unsubscribeDetectedAtMillis`** | number \| null
| The date an unsubscribe was detected in milliseconds. Can be `null`. Entitlement may still be active even if user has unsubscribed. Check the `isActive` property. |
| **`billingIssueDetectedAt`** | string \| null
| The date a billing issue was detected in ISO8601 format. Can be `null` if there is no billing issue or an issue has been resolved Entitlement may still be active even if there is a billing issue. Check the `isActive` property. |
| **`billingIssueDetectedAtMillis`** | number \| null
| The date a billing issue was detected in milliseconds. Can be `null` if there is no billing issue or an issue has been resolved Entitlement may still be active even if there is a billing issue. Check the `isActive` property. |
| **`ownershipType`** | 'FAMILY_SHARED' \| 'PURCHASED' \| 'UNKNOWN'
| Supported ownership types for an entitlement. PURCHASED if the purchase was made directly by this user. FAMILY_SHARED if the purchase has been shared to this user by a family member. UNKNOWN if the purchase has no or an unknown ownership type. |
| **`verification`** | VERIFICATION_RESULT
| If entitlement verification was enabled, the result of that verification. If not, VerificationResult.NOT_REQUESTED |
#### PurchasesStoreTransaction
Represents a non-subscription transaction in the Store.
| Prop | Type | Description |
| --------------------------- | ------------------- | ---------------------------------------------------- |
| **`transactionIdentifier`** | string
| Id of the transaction. |
| **`productIdentifier`** | string
| Product Id associated with the transaction. |
| **`purchaseDate`** | string
| Purchase date of the transaction in ISO 8601 format. |
#### PurchasesOfferings
Contains all the offerings configured in RevenueCat dashboard.
For more info see https://docs.revenuecat.com/docs/entitlements
| Prop | Type | Description |
| ------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| **`all`** | { [key: string]: PurchasesOffering; }
| Map of all Offerings [PurchasesOffering] objects keyed by their identifier. |
| **`current`** | PurchasesOffering \| null
| Current offering configured in the RevenueCat dashboard. |
#### PurchasesOffering
An offering is a collection of Packages (`PurchasesPackage`) available for the user to purchase.
For more info see https://docs.revenuecat.com/docs/entitlements
| Prop | Type | Description |
| ----------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`identifier`** | string
| Unique identifier defined in RevenueCat dashboard. |
| **`serverDescription`** | string
| Offering description defined in RevenueCat dashboard. |
| **`metadata`** | { [key: string]: unknown; }
| Offering metadata defined in RevenueCat dashboard. To access values, you need to check the type beforehand. For example: const my_unknown_value: unknown = offering.metadata['my_key']; const my_string_value: string \| undefined = typeof(my_unknown_value) === 'string' ? my_unknown_value : undefined; |
| **`availablePackages`** | PurchasesPackage[]
| Array of `Package` objects available for purchase. |
| **`lifetime`** | PurchasesPackage \| null
| Lifetime package type configured in the RevenueCat dashboard, if available. |
| **`annual`** | PurchasesPackage \| null
| Annual package type configured in the RevenueCat dashboard, if available. |
| **`sixMonth`** | PurchasesPackage \| null
| Six month package type configured in the RevenueCat dashboard, if available. |
| **`threeMonth`** | PurchasesPackage \| null
| Three month package type configured in the RevenueCat dashboard, if available. |
| **`twoMonth`** | PurchasesPackage \| null
| Two month package type configured in the RevenueCat dashboard, if available. |
| **`monthly`** | PurchasesPackage \| null
| Monthly package type configured in the RevenueCat dashboard, if available. |
| **`weekly`** | PurchasesPackage \| null
| Weekly package type configured in the RevenueCat dashboard, if available. |
#### PurchasesPackage
Contains information about the product available for the user to purchase.
For more info see https://docs.revenuecat.com/docs/entitlements
| Prop | Type | Description |
| ------------------------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **`identifier`** | string
| Unique identifier for this package. Can be one a predefined package type or a custom one. |
| **`packageType`** | PACKAGE_TYPE
| Package type for the product. Will be one of [PACKAGE_TYPE]. |
| **`product`** | PurchasesStoreProduct
| Product assigned to this package. |
| **`offeringIdentifier`** | string
| Offering this package belongs to. |
| **`presentedOfferingContext`** | PresentedOfferingContext
| Offering context this package belongs to. Null if not using offerings or if fetched directly from store via getProducts. |
#### PurchasesStoreProduct
Type representing a product from the Store.
| Prop | Type | Description |
| --------------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`identifier`** | string
| Product Id. |
| **`description`** | string
| Description of the product. |
| **`title`** | string
| Title of the product. |
| **`price`** | number
| Price of the product in the local currency. Contains the price value of defaultOption for Google Play. |
| **`priceString`** | string
| Formatted price of the item, including its currency sign. Contains the formatted price value of defaultOption for Google Play. |
| **`pricePerWeek`** | number
| Null for INAPP products. The price of the PurchasesStoreProduct in a weekly recurrence. This means that, for example, if the period is monthly, the price will be divided by 4. Note that this value may be an approximation. For Google subscriptions, this value will use the basePlan to calculate the value. |
| **`pricePerMonth`** | number
| Null for INAPP products. The price of the PurchasesStoreProduct in a monthly recurrence. This means that, for example, if the period is annual, the price will be divided by 12. Note that this value may be an approximation. For Google subscriptions, this value will use the basePlan to calculate the value. |
| **`pricePerYear`** | number
| Null for INAPP products. The price of the PurchasesStoreProduct in a yearly recurrence. This means that, for example, if the period is monthly, the price will be multiplied by 12. Note that this value may be an approximation. For Google subscriptions, this value will use the basePlan to calculate the value. |
| **`pricePerWeekString`** | string
| Null for INAPP products. The price of the PurchasesStoreProduct formatted for the current 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. |
| **`pricePerMonthString`** | string
| Null for INAPP products. The price of the PurchasesStoreProduct formatted for the current 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. |
| **`pricePerYearString`** | string
| Null for INAPP products. The price of the PurchasesStoreProduct formatted for the current 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. |
| **`currencyCode`** | string
| Currency code for price and original price. Contains the currency code value of defaultOption for Google Play. |
| **`introPrice`** | PurchasesIntroPrice \| null
| Introductory price. |
| **`discounts`** | PurchasesStoreProductDiscount[] \| null
| Collection of discount offers for a product. Null for Android. |
| **`productCategory`** | PRODUCT_CATEGORY \| null
| Product category. |
| **`productType`** | PRODUCT_TYPE
| The specific type of subscription or one time purchase this product represents. Important: In iOS, if using StoreKit 1, we cannot determine the type. |
| **`subscriptionPeriod`** | string \| null
| 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: Not available for Amazon. |
| **`defaultOption`** | SubscriptionOption \| null
| Default subscription option for a product. Google Play only. |
| **`subscriptionOptions`** | SubscriptionOption[] \| null
| Collection of subscription options for a product. Google Play only. |
| **`presentedOfferingIdentifier`** | string \| null
| Offering identifier the store product was presented from. Null if not using offerings or if fetched directly from store via getProducts. |
| **`presentedOfferingContext`** | PresentedOfferingContext \| null
| Offering context this package belongs to. Null if not using offerings or if fetched directly from store via getProducts. |
#### PurchasesIntroPrice
Contains information about the introductory price for a product
| Prop | Type | Description |
| ------------------------- | ------------------- | ------------------------------------------------------------------------------------------------ |
| **`price`** | number
| Price in the local currency. |
| **`priceString`** | string
| Formatted price, including its currency sign, such as €3.99. |
| **`cycles`** | number
| Number of subscription billing periods for which the user will be given the discount, such as 3. |
| **`period`** | string
| Billing period of the discount, specified in ISO 8601 format. |
| **`periodUnit`** | string
| Unit for the billing period of the discount, can be DAY, WEEK, MONTH or YEAR. |
| **`periodNumberOfUnits`** | number
| Number of units for the billing period of the discount. |
#### PurchasesStoreProductDiscount
Contains information about a discount offer for a product
| Prop | Type | Description |
| ------------------------- | ------------------- | ------------------------------------------------------------------------------------------------ |
| **`identifier`** | string
| Identifier of the discount. |
| **`price`** | number
| Price in the local currency. |
| **`priceString`** | string
| Formatted price, including its currency sign, such as €3.99. |
| **`cycles`** | number
| Number of subscription billing periods for which the user will be given the discount, such as 3. |
| **`period`** | string
| Billing period of the discount, specified in ISO 8601 format. |
| **`periodUnit`** | string
| Unit for the billing period of the discount, can be DAY, WEEK, MONTH or YEAR. |
| **`periodNumberOfUnits`** | number
| Number of units for the billing period of the discount. |
#### SubscriptionOption
Contains all details associated with a SubscriptionOption
Used only for Google
| Prop | Type | Description |
| --------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **`id`** | string
| Identifier of the subscription option If this SubscriptionOption represents a base plan, this will be the basePlanId. If it represents an offer, it will be basePlanId:offerId |
| **`storeProductId`** | string
| Identifier of the StoreProduct associated with this SubscriptionOption This will be subId:basePlanId |
| **`productId`** | string
| Identifer of the subscription associated with this SubscriptionOption This will be subId |
| **`pricingPhases`** | PricingPhase[]
| Pricing phases defining a user's payment plan for the product over time. |
| **`tags`** | string[]
| Tags defined on the base plan or offer. Empty for Amazon. |
| **`isBasePlan`** | boolean
| True if this SubscriptionOption represents a subscription base plan (rather than an offer). |
| **`billingPeriod`** | Period \| null
| The subscription period of fullPricePhase (after free and intro trials). |
| **`isPrepaid`** | boolean
| True if the subscription is pre-paid. |
| **`fullPricePhase`** | PricingPhase \| null
| The full price PricingPhase of the subscription. Looks for the last price phase of the SubscriptionOption. |
| **`freePhase`** | PricingPhase \| null
| The free trial PricingPhase of the subscription. Looks for the first pricing phase of the SubscriptionOption where amountMicros is 0. There can be a freeTrialPhase and an introductoryPhase in the same SubscriptionOption. |
| **`introPhase`** | PricingPhase \| null
| The intro trial PricingPhase of the subscription. Looks for the first pricing phase of the SubscriptionOption where amountMicros is greater than 0. There can be a freeTrialPhase and an introductoryPhase in the same SubscriptionOption. |
| **`presentedOfferingIdentifier`** | string \| null
| Offering identifier the subscription option was presented from |
| **`presentedOfferingContext`** | PresentedOfferingContext \| null
| Offering context this package belongs to. Null if not using offerings or if fetched directly from store via getProducts. |
| **`installmentsInfo`** | InstallmentsInfo \| null
| For installment subscriptions, the details of the installment plan the customer commits to. Null for non-installment subscriptions. Installment plans are only available for Google Play subscriptions. |
#### PricingPhase
Contains all the details associated with a PricingPhase
| Prop | Type | Description |
| ----------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| **`billingPeriod`** | Period
| Billing period for which the PricingPhase applies |
| **`recurrenceMode`** | RECURRENCE_MODE \| null
| Recurrence mode of the PricingPhase |
| **`billingCycleCount`** | number \| null
| Number of cycles for which the pricing phase applies. Null for infiniteRecurring or finiteRecurring recurrence modes. |
| **`price`** | Price
| Price of the PricingPhase |
| **`offerPaymentMode`** | OFFER_PAYMENT_MODE \| null
| Indicates how the pricing phase is charged for finiteRecurring pricing phases |
#### Period
Contains all the details associated with a Period
| Prop | Type | Description |
| ------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`unit`** | PERIOD_UNIT
| The number of period units: day, week, month, year, unknown |
| **`value`** | number
| The increment of time that a subscription period is specified in |
| **`iso8601`** | string
| 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 |
#### Price
Contains all the details associated with a Price
| Prop | Type | Description |
| ------------------ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`formatted`** | string
| Formatted price of the item, including its currency sign. For example $3.00 |
| **`amountMicros`** | number
| 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 7,990,000. This value represents the localized, rounded price for a particular currency. |
| **`currencyCode`** | string
| 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". If currency code cannot be determined, currency symbol is returned. |
#### PresentedOfferingContext
Contains data about the context in which an offering was presented.
| Prop | Type | Description |
| ------------------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| **`offeringIdentifier`** | string
| The identifier of the offering used to obtain this object. |
| **`placementIdentifier`** | string \| null
| The identifier of the placement used to obtain this object. |
| **`targetingContext`** | PresentedOfferingTargetingContext \| null
| The revision of the targeting used to obtain this object. |
#### PresentedOfferingTargetingContext
Contains data about the context in which an offering was presented.
| Prop | Type | Description |
| -------------- | ------------------- | ---------------------------------------------------------- |
| **`revision`** | number
| The revision of the targeting used to obtain this object. |
| **`ruleId`** | string
| The rule id from the targeting used to obtain this object. |
#### InstallmentsInfo
Type containing information of installment subscriptions. Currently only supported in Google Play.
| Prop | Type | Description |
| ------------------------------------ | ------------------- | ------------------------------------------------------------------------------------------------------ |
| **`commitmentPaymentsCount`** | number
| Number of payments the customer commits to in order to purchase the subscription. |
| **`renewalCommitmentPaymentsCount`** | number
| After the commitment payments are complete, the number of payments the user commits to upon a renewal. |
#### GetProductOptions
| Prop | Type | Description |
| ------------------------ | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| **`productIdentifiers`** | string[]
| Array of product identifiers to obtain |
| **`type`** | PRODUCT_CATEGORY
| Optional type of products to fetch, can be SUBSCRIPTION or NON_SUBSCRIPTION. SUBSCRIPTION by default. Ignored in iOS. |
#### PurchaseStoreProductOptions
| Prop | Type | Description |
| ------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`product`** | PurchasesStoreProduct
| The product you want to purchase |
| **`googleProductChangeInfo`** | GoogleProductChangeInfo \| null
| Android only. Optional GoogleProductChangeInfo you wish to upgrade from containing the oldProductIdentifier and the optional prorationMode. |
| **`googleIsPersonalizedPrice`** | boolean \| null
| Android and Google only. Optional boolean indicates personalized pricing on products available for purchase in the EU. For compliance with EU regulations. User will see "This price has been customized for you" in the purchase dialog when true. See https://developer.android.com/google/play/billing/integrate#personalized-price for more info. |
#### GoogleProductChangeInfo
Holds the information used when upgrading from another sku. For Android use only.
| Prop | Type | Description |
| -------------------------- | --------------------------------------------------------- | ------------------------------------------------------------ |
| **`oldProductIdentifier`** | string
| The old product identifier to upgrade from. |
| **`prorationMode`** | PRORATION_MODE
| The [PRORATION_MODE] to use when upgrading the given oldSKU. |
#### PurchaseDiscountedProductOptions
| Prop | Type | Description |
| -------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| **`product`** | PurchasesStoreProduct
| The product you want to purchase |
| **`discount`** | PurchasesPromotionalOffer
| Discount to apply to this package. Retrieve this discount using getPromotionalOffer. |
#### PurchasesPromotionalOffer
Holds the information about a PromotionalOffer in Apple's App Store.
| Prop | Type |
| ------------------- | ------------------- |
| **`identifier`** | string
|
| **`keyIdentifier`** | string
|
| **`nonce`** | string
|
| **`signature`** | string
|
| **`timestamp`** | number
|
#### PurchasePackageOptions
| Prop | Type | Description |
| ------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`aPackage`** | PurchasesPackage
| The Package you wish to purchase. You can get the Packages by calling getOfferings |
| **`googleProductChangeInfo`** | GoogleProductChangeInfo \| null
| Android only. Optional GoogleProductChangeInfo you wish to upgrade from containing the oldProductIdentifier and the optional prorationMode. |
| **`googleIsPersonalizedPrice`** | boolean \| null
| Android and Google only. Optional boolean indicates personalized pricing on products available for purchase in the EU. For compliance with EU regulations. User will see "This price has been customized for you" in the purchase dialog when true. See https://developer.android.com/google/play/billing/integrate#personalized-price for more info. |
#### PurchaseSubscriptionOptionOptions
| Prop | Type | Description |
| ------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`subscriptionOption`** | SubscriptionOption
| The SubscriptionOption you wish to purchase. You can get the SubscriptionOption from StoreProducts by calling getOfferings |
| **`googleProductChangeInfo`** | GoogleProductChangeInfo \| null
| Android only. Optional GoogleProductChangeInfo you wish to upgrade from containing the oldProductIdentifier and the optional prorationMode. |
| **`googleIsPersonalizedPrice`** | boolean \| null
| Android and Google only. Optional boolean indicates personalized pricing on products available for purchase in the EU. For compliance with EU regulations. User will see "This price has been customized for you" in the purchase dialog when true. See https://developer.android.com/google/play/billing/integrate#personalized-price for more info. |
#### PurchaseDiscountedPackageOptions
| Prop | Type | Description |
| -------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| **`aPackage`** | PurchasesPackage
| The Package you wish to purchase. You can get the Packages by calling getOfferings |
| **`discount`** | PurchasesPromotionalOffer
| Discount to apply to this package. Retrieve this discount using getPromotionalOffer. |
#### LogInResult
Holds the logIn result
| Prop | Type | Description |
| ------------------ | ----------------------------------------------------- | ---------------------------------------------------------------------------------- |
| **`customerInfo`** | CustomerInfo
| The Customer Info for the user. |
| **`created`** | boolean
| True if the call resulted in a new user getting created in the RevenueCat backend. |
#### SyncAmazonPurchaseOptions
| Prop | Type | Description |
| --------------------- | --------------------------- | ------------------------------------------------------------------------------- |
| **`productID`** | string
| Product ID associated to the purchase. |
| **`receiptID`** | string
| ReceiptId that represents the Amazon purchase. |
| **`amazonUserID`** | string
| Amazon's userID. This parameter will be ignored when syncing a Google purchase. |
| **`isoCurrencyCode`** | string \| null
| Product's currency code in ISO 4217 format. |
| **`price`** | number \| null
| Product's price. |
#### IntroEligibility
Holds the introductory price status
| Prop | Type | Description |
| ----------------- | ----------------------------------------------------------------------------- | ----------------------------------------- |
| **`status`** | INTRO_ELIGIBILITY_STATUS
| The introductory price eligibility status |
| **`description`** | string
| Description of the status |
#### GetPromotionalOfferOptions
| Prop | Type | Description |
| -------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| **`product`** | PurchasesStoreProduct
| The `PurchasesStoreProduct` the user intends to purchase. |
| **`discount`** | PurchasesStoreProductDiscount
| The `PurchasesStoreProductDiscount` to apply to the product. |
### Type Aliases
#### PurchasesAreCompletedBy
Allows you to specify whether you want RevenueCat to complete your app's purchases
or if your app will do so.
You can configure RevenueCat to complete your purchases like so:
```typescript
Purchases.configure({
apiKey: "123",
purchasesAreCompletedBy: PURCHASES_ARE_COMPLETED_BY.REVENUECAT,
});
```
You can specify that purchase are completed by your app like so:
```typescript
Purchases.configure({
apiKey: "123",
purchasesAreCompletedBy: {
type: PURCHASES_ARE_COMPLETED_BY.MY_APP,
storeKitVersion: STOREKIT_VERSION.STOREKIT_1
},
});
```
PURCHASES_ARE_COMPLETED_BY_TYPE.REVENUECAT | PurchasesAreCompletedByMyApp
#### PurchasesAreCompletedByMyApp
Configuration option that specifies that your app will complete purchases.
{ type: PURCHASES_ARE_COMPLETED_BY_TYPE.MY_APP; /** * The version of StoreKit that your app is using to make purchases. This value is ignored * on Android, so if your app is Android-only, you may provide any value. */ storeKitVersion: STOREKIT_VERSION; }
#### CustomerInfoUpdateListener
Listener used on updated customer info
(customerInfo: CustomerInfo): void
#### PurchasesCallbackId
string
#### MakePurchaseResult
Result of a successful purchase
{ /** * The product identifier of the purchased product */ productIdentifier: string; /** * The Customer Info for the user. */ customerInfo: CustomerInfo; /** * The transaction object for the purchase */ transaction: PurchasesStoreTransaction; }
#### LogHandler
Listener used to receive log messages from the SDK.
(logLevel: LOG_LEVEL, message: string): void
#### SyncObserverModeAmazonPurchaseOptions
SyncAmazonPurchaseOptions
### Enums
#### PURCHASES_ARE_COMPLETED_BY_TYPE
| Members | Value | Description |
| ---------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **`MY_APP`** | "MY_APP"
| RevenueCat will **not** automatically acknowledge any purchases. You will have to do so manually. **Note:** failing to acknowledge a purchase within 3 days will lead to Google Play automatically issuing a refund to the user. For more info, see [revenuecat.com](https://docs.revenuecat.com/docs/observer-mode#option-2-client-side). |
| **`REVENUECAT`** | "REVENUECAT"
| RevenueCat will automatically acknowledge verified purchases. No action is required by you. |
#### STOREKIT_VERSION
| Members | Value | Description |
| ---------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`STOREKIT_1`** | "STOREKIT_1"
| Always use StoreKit 1. |
| **`STOREKIT_2`** | "STOREKIT_2"
| Always use StoreKit 2 (StoreKit 1 will be used if StoreKit 2 is not available in the current device.) - 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. |
| **`DEFAULT`** | "DEFAULT"
| Let RevenueCat use the most appropriate version of StoreKit |
#### ENTITLEMENT_VERIFICATION_MODE
| Members | Value | Description |
| ------------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`DISABLED`** | "DISABLED"
| The SDK will not perform any entitlement verification. |
| **`INFORMATIONAL`** | "INFORMATIONAL"
| Enable entitlement verification. If verification fails, this will be indicated with [VerificationResult.FAILED] in the [EntitlementInfos.verification] and [EntitlementInfo.verification] properties but parsing will not fail (i.e. Entitlements will still be granted). This can be useful if you want to handle verification failures to display an error/warning to the user or to track this situation but still grant access. |
#### VERIFICATION_RESULT
| Members | Value | Description |
| ------------------------ | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`NOT_REQUESTED`** | "NOT_REQUESTED"
| No verification was done. This value is returned when verification is not enabled in PurchasesConfiguration |
| **`VERIFIED`** | "VERIFIED"
| Verification with our server was performed successfully. |
| **`FAILED`** | "FAILED"
| Verification failed, possibly due to a MiTM attack. |
| **`VERIFIED_ON_DEVICE`** | "VERIFIED_ON_DEVICE"
| Verification was performed on device. |
#### PACKAGE_TYPE
| Members | Value | Description |
| ----------------- | -------------------------- | ---------------------------------------------------------------- |
| **`UNKNOWN`** | "UNKNOWN"
| A package that was defined with a custom identifier. |
| **`CUSTOM`** | "CUSTOM"
| A package that was defined with a custom identifier. |
| **`LIFETIME`** | "LIFETIME"
| A package configured with the predefined lifetime identifier. |
| **`ANNUAL`** | "ANNUAL"
| A package configured with the predefined annual identifier. |
| **`SIX_MONTH`** | "SIX_MONTH"
| A package configured with the predefined six month identifier. |
| **`THREE_MONTH`** | "THREE_MONTH"
| A package configured with the predefined three month identifier. |
| **`TWO_MONTH`** | "TWO_MONTH"
| A package configured with the predefined two month identifier. |
| **`MONTHLY`** | "MONTHLY"
| A package configured with the predefined monthly identifier. |
| **`WEEKLY`** | "WEEKLY"
| A package configured with the predefined weekly identifier. |
#### PRODUCT_CATEGORY
| Members | Value | Description |
| ---------------------- | ------------------------------- | --------------------------------------- |
| **`NON_SUBSCRIPTION`** | "NON_SUBSCRIPTION"
| A type of product for non-subscription. |
| **`SUBSCRIPTION`** | "SUBSCRIPTION"
| A type of product for subscriptions. |
| **`UNKNOWN`** | "UNKNOWN"
| A type of product for unknowns. |
#### PRODUCT_TYPE
| Members | Value | Description |
| --------------------------------- | ------------------------------------------ | ----------------------------------------------------------------------- |
| **`CONSUMABLE`** | "CONSUMABLE"
| A consumable in-app purchase. |
| **`NON_CONSUMABLE`** | "NON_CONSUMABLE"
| A non-consumable in-app purchase. Only applies to Apple Store products. |
| **`NON_RENEWABLE_SUBSCRIPTION`** | "NON_RENEWABLE_SUBSCRIPTION"
| A non-renewing subscription. Only applies to Apple Store products. |
| **`AUTO_RENEWABLE_SUBSCRIPTION`** | "AUTO_RENEWABLE_SUBSCRIPTION"
| An auto-renewable subscription. |
| **`PREPAID_SUBSCRIPTION`** | "PREPAID_SUBSCRIPTION"
| A subscription that is pre-paid. Only applies to Google Play products. |
| **`UNKNOWN`** | "UNKNOWN"
| Unable to determine product type. |
#### PERIOD_UNIT
| Members | Value |
| ------------- | ---------------------- |
| **`DAY`** | "DAY"
|
| **`WEEK`** | "WEEK"
|
| **`MONTH`** | "MONTH"
|
| **`YEAR`** | "YEAR"
|
| **`UNKNOWN`** | "UNKNOWN"
|
#### RECURRENCE_MODE
| Members | Value | Description |
| ------------------------ | -------------- | ----------------------------------------------------------- |
| **`INFINITE_RECURRING`** | 1
| Pricing phase repeats infinitely until cancellation |
| **`FINITE_RECURRING`** | 2
| Pricing phase repeats for a fixed number of billing periods |
| **`NON_RECURRING`** | 3
| Pricing phase does not repeat |
#### OFFER_PAYMENT_MODE
| Members | Value | Description |
| ---------------------------------- | ------------------------------------------- | --------------------------------------------------------------------- |
| **`FREE_TRIAL`** | "FREE_TRIAL"
| Subscribers don't pay until the specified period ends |
| **`SINGLE_PAYMENT`** | "SINGLE_PAYMENT"
| Subscribers pay up front for a specified period |
| **`DISCOUNTED_RECURRING_PAYMENT`** | "DISCOUNTED_RECURRING_PAYMENT"
| Subscribers pay a discounted amount for a specified number of periods |
#### PRORATION_MODE
| Members | Value | Description |
| --------------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY`** | 0
| |
| **`IMMEDIATE_WITH_TIME_PRORATION`** | 1
| Replacement takes effect immediately, and the remaining time will be prorated and credited to the user. This is the current default behavior. |
| **`IMMEDIATE_AND_CHARGE_PRORATED_PRICE`** | 2
| Replacement takes effect immediately, and the billing cycle remains the same. The price for the remaining period will be charged. This option is only available for subscription upgrade. |
| **`IMMEDIATE_WITHOUT_PRORATION`** | 3
| Replacement takes effect immediately, and the new price will be charged on next recurrence time. The billing cycle stays the same. |
| **`DEFERRED`** | 6
| Replacement takes effect when the old plan expires, and the new price will be charged at the same time. |
| **`IMMEDIATE_AND_CHARGE_FULL_PRICE`** | 5
| Replacement takes effect immediately, and the user is charged full price of new plan and is given a full billing cycle of subscription, plus remaining prorated time from the old plan. |
#### LOG_LEVEL
| Members | Value |
| ------------- | ---------------------- |
| **`VERBOSE`** | "VERBOSE"
|
| **`DEBUG`** | "DEBUG"
|
| **`INFO`** | "INFO"
|
| **`WARN`** | "WARN"
|
| **`ERROR`** | "ERROR"
|
#### INTRO_ELIGIBILITY_STATUS
| Members | Value | Description |
| ---------------------------------------------------- | -------------- | ---------------------------------------------------------------------------- |
| **`INTRO_ELIGIBILITY_STATUS_UNKNOWN`** | 0
| RevenueCat doesn't have enough information to determine eligibility. |
| **`INTRO_ELIGIBILITY_STATUS_INELIGIBLE`** | 1
| The user is not eligible for a free trial or intro pricing for this product. |
| **`INTRO_ELIGIBILITY_STATUS_ELIGIBLE`** | 2
| The user is eligible for a free trial or intro pricing for this product. |
| **`INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS`** | 3
| There is no free trial or intro pricing for this product. |
#### BILLING_FEATURE
| Members | Value | Description |
| ------------------------------- | -------------- | ---------------------------------------- |
| **`SUBSCRIPTIONS`** | 0
| Purchase/query for subscriptions. |
| **`SUBSCRIPTIONS_UPDATE`** | 1
| Subscriptions update/replace. |
| **`IN_APP_ITEMS_ON_VR`** | 2
| Purchase/query for in-app items on VR. |
| **`SUBSCRIPTIONS_ON_VR`** | 3
| Purchase/query for subscriptions on VR. |
| **`PRICE_CHANGE_CONFIRMATION`** | 4
| Launch a price change confirmation flow. |
#### REFUND_REQUEST_STATUS
| Members | Value | Description |
| -------------------- | -------------- | ------------------------------------------------------------------ |
| **`SUCCESS`** | 0
| Apple has received the refund request. |
| **`USER_CANCELLED`** | 1
| User canceled submission of the refund request. |
| **`ERROR`** | 2
| There was an error with the request. See message for more details. |
#### IN_APP_MESSAGE_TYPE
| Members | Value | Description |
| ---------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **`BILLING_ISSUE`** | 0
| In-app messages to indicate there has been a billing issue charging the user. |
| **`PRICE_INCREASE_CONSENT`** | 1
| iOS-only. This message will show if you increase the price of a subscription and the user needs to opt-in to the increase. |
| **`GENERIC`** | 2
| iOS-only. StoreKit generic messages. |
| **`WIN_BACK_OFFER`** | 3
| iOS-only. This message will show if the subscriber is eligible for an iOS win-back offer and will allow the subscriber to redeem the offer. |