Constructors

Properties

appStoreReceipt?: null | ApplicationReceipt

The application receipt from AppStore, cached in javascript

onFailed: boolean = false

Deprecated

onPurchased: boolean = false

Deprecated

onRestored: boolean = false

Deprecated

Callbacks set by the adapter

transactionsForProduct: {
    [productId: string]: string[];
} = {}

Transactions for a given product

Type declaration

  • [productId: string]: string[]

Methods

  • Checks if device/user is allowed to make in-app purchases

    Parameters

    • success: (() => void)
        • (): void
        • Returns void

    • error: ((message) => void)
        • (message): void
        • Parameters

          • message: string

          Returns void

    Returns void

  • Returns void

  • Parameters

    • transactionId: string
    • success: (() => void)
        • (): void
        • Returns void

    • error: ((msg) => void)
        • (msg): void
        • Parameters

          • msg: string

          Returns void

    Returns void

  • Initialize the AppStore bridge.

    This calls the native "setup" method from the "InAppPurchase" Objective-C class.

    Parameters

    • options: Partial<BridgeOptions>

      Options for the bridge

    • success: (() => void)

      Called when the bridge is ready

        • (): void
        • Returns void

    • error: ((code, message) => void)

      Called when the bridge failed to initialize

    Returns void

  • Returns void

  • Retrieves localized product data, including price (as localized string), name, description of multiple products.

    Parameters

    • productIds: string[]

      An array of product identifier strings.

    • success: ((validProducts, invalidProductIds) => void)
        • (validProducts, invalidProductIds): void
        • Parameters

          Returns void

    • error: ((code, message) => void)

    Returns void

  • Parameters

    • callback: ((receipt) => void)
    • errorCb: ((code, message) => void)

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Returns void

  • Makes an in-app purchase.

    Parameters

    • productId: string

      The product identifier. e.g. "com.example.MyApp.myproduct"

    • quantity: number

      Quantity of product to purchase

    • applicationUsername: undefined | string
    • discount: undefined | PaymentDiscount
    • success: (() => void)
        • (): void
        • Returns void

    • error: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • successCb: ((receipt) => void)
    • errorCb: ((code, message) => void)

    Returns void

  • Asks the payment queue to restore previously completed purchases.

    The restored transactions are passed to the onRestored callback, so make sure you define a handler for that first.

    Parameters

    Returns void

  • Parameters

    Returns void

  • Returns void

  • Parameters

    Returns void