API reference
Hand-curated reference for the 8.x (Capacitor 8) line.
Modules
| Page | Contents |
|---|---|
createIAP | Factory function; entry point |
IAP instance | All instance methods |
| Types | Product, EntitlementBase, NativeTransaction, VerifiedTransaction, PurchaseResult, RestoreResult |
| Errors | IAPError, IAPErrorCode, errorHint, isIAPError |
BackendAdapter | Interface for custom transports |
| Events reference | EventMap, EventName, EventPayload, Unsubscribe |
Top-level exports
typescript
import {
// Factory
createIAP,
type IAP,
// Errors
IAPError,
IAPErrorCode,
isIAPError,
// Config
type IAPConfig,
type IAPConfigInput,
type BackendConfig,
type BackendConfigInput,
type StorageConfig,
type OptionsConfig,
type VerificationConfig,
// Domain types
type ConfiguredProduct,
type Product,
type ProductType,
type Storefront,
type EntitlementBase,
type DefaultEntitlement,
type NativeTransaction,
type VerifiedTransaction,
type Platform,
type PurchaseResult,
type RestoreResult,
type StorePurchase,
type SubscriptionOffer,
type SubscriptionOfferType,
type SubscriptionOfferPayment,
type SubscriptionRenewal,
type SubscriptionState,
// On-device verification (local mode)
verifyPurchaseOnDevice,
isExpired,
type LocallyVerifiedPurchase,
type LocalVerification,
type LocalVerificationError,
type LocalVerificationOptions,
type PurchaseAssurance,
// Events
type EventMap,
type EventName,
type EventPayload,
type Unsubscribe,
// Logging
type Logger,
type LogLevel,
// Backend (advanced)
type BackendAdapter,
type RestoreRequest,
type RestoreRequestTransaction,
type VerifyAppleRequest,
type VerifyGoogleRequest,
type VerifyResponse,
HttpBackendAdapter,
HttpClient,
type HttpRequest,
// Version
VERSION,
} from '@nosslabs/iap';Stability
- Stable —
createIAP,IAPinterface methods, allEntitlementBase/Product/PurchaseResult/RestoreResulttypes, everyIAPErrorCodevalue, every event inEventMap. These follow semver. - Stable but advanced —
BackendAdapter,HttpBackendAdapter,HttpClient. Public so non-HTTP transports can be implemented; we reserve the right to add new methods toBackendAdapterin minor versions (additive only). - Internal — anything not listed in
src/index.tsis private. Don't import from deep paths.