Namespace for the cordova-plugin-purchase plugin.

All classes, enumerations and variables defined by the plugin are in this namespace.

Throughout the documentation, in order to keep examples readable, we omit the CdvPurchase prefix.

When you see, for example ProductType.PAID_SUBSCRIPTION, it refers to CdvPurchase.ProductType.PAID_SUBSCRIPTION.

In your code, you should access members directly through the CdvPurchase namespace:

// Recommended approach (works reliably with minification)
CdvPurchase.store.initialize();
CdvPurchase.store.register({
id: 'my-product',
type: CdvPurchase.ProductType.PAID_SUBSCRIPTION,
platform: CdvPurchase.Platform.APPLE_APPSTORE
});

Note: Using destructuring with the namespace may cause issues with minification tools:

// NOT recommended - may cause issues with minification tools like Terser
const { store, ProductType, Platform, LogLevel } = CdvPurchase;

Index

Namespaces

Enumerations

Classes

Interfaces

Type Aliases

Variables