8000 GitHub - RevenueCat/purchases-capacitor: Capacitor in-app purchases and subscriptions made easy.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

RevenueCat/purchases-capacitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

😻 In-App Subscriptions Made Easy 😻

License Release

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.
  • Host and configure products remotely from our dashboard.
  • Analyze the most important metrics for your app business in one place.
  • See customer transaction histories, chart lifetime value, and grant promotional subscriptions.
  • Get notified of real-time events through webhooks.
  • Send enriched purchase events to analytics and attribution tools with our easy integrations.

Sign up to get started for free.

@revenuecat/purchases-capacitor

@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 SDK Features

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

Getting Started

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

Contributing

Contributions are always welcome! To learn how you can contribute, please see the Contributing Guide.

Acknowledgment

This plugin is based on CapGo's Capacitor plugin. The plugin was transferred to RevenueCat to become an officially supported plugin.

API

configure(...)

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

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

Param Type Description
configuration PurchasesConfiguration RevenueCat configuration object including the API key and other optional parameters. See {@link PurchasesConfiguration}

parseAsWebPurchaseRedemption(...)

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 { urlString: string; } Set the urlString used to open the App.

Returns: Promise<{ webPurchaseRedemption: WebPurchaseRedemption | null; }>


redeemWebPurchase(...)

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

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

Param Type Description
options { webPurchaseRedemption: WebPurchaseRedemption; } The WebPurchaseRedemption object obtained from {@link parseAsWebPurchaseRedemption}.

Returns: Promise<WebPurchaseRedemptionResult>


setMockWebResults(...)

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 { shouldMockWebResults: boolean; } Set shouldMockWebResults to true if you want the plugin methods to return mocked values

setSimulatesAskToBuyInSandbox(...)

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

iOS only.

Param Type Description
options { 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(...)

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

Sets a function to be called on updated customer info

Param Type Description
customerInfoUpdateListener CustomerInfoUpdateListener CustomerInfo update listener

Returns: Promise<string>


removeCustomerInfoUpdateListener(...)