@capgo/native-purchases
In-app Subscriptions Made Easy.
Overview
Section titled “Overview”In-app Subscriptions Made Easy.
Core Capabilities
Section titled “Core Capabilities”restorePurchases- Restores a user’s previous and links their appUserIDs to any user’s also using those .getAppTransaction- Gets the App Transaction information, which provides details about when the user originally downloaded or purchased the app.isEntitledToOldBusinessModel- Compares the original app version from the App Transaction against a target version to determine if the user is entitled to features from an earlier business model.purchaseProduct- Started purchase process for the given product.
Public API
Section titled “Public API”| Method | Description |
|---|---|
restorePurchases | Restores a user’s previous and links their appUserIDs to any user’s also using those . |
getAppTransaction | Gets the App Transaction information, which provides details about when the user originally downloaded or purchased the app. |
isEntitledToOldBusinessModel | Compares the original app version from the App Transaction against a target version to determine if the user is entitled to features from an earlier business model. |
purchaseProduct | Started purchase process for the given product. |
getProducts | Gets the product info associated with a list of product identifiers. |
getProduct | Gets the product info for a single product identifier. |
isBillingSupported | Check if billing is supported for the current device. |
getPluginVersion | Get the native Capacitor plugin version. |
getPurchases | Gets all the user’s purchases (both in-app purchases and subscriptions). This method queries the platform’s purchase history for the current user. |
manageSubscriptions | Opens the platform’s native subscription management page. This allows users to view, modify, or cancel their subscriptions. |
acknowledgePurchase | Manually acknowledge/finish a purchase transaction. |
consumePurchase | Consume an in-app purchase on Android. |
addListener | Listen for StoreKit transaction updates delivered by Apple’s Transaction.updates. Fires on app launch if there are unfinished transactions, and for any updates afterward. iOS only. |
addListener | Listen for StoreKit transaction verification failures delivered by Apple’s Transaction.updates. Fires when the verification result is unverified. iOS only. |
removeAllListeners | Remove all registered listeners. |
Source Of Truth
Section titled “Source Of Truth”This reference is synced from src/definitions.ts in capacitor-native-purchases.