Header menu logo fable-electron-docs-api

inAppPurchase Type

⚠ Process Availability: Main ✔ | Renderer ❌ | Utility ❌ | Exported ✔

In-app purchases on Mac App Store.Process: Main

Static members

Static member Description

inAppPurchase.canMakePayments ()

Full Usage: inAppPurchase.canMakePayments ()

Returns: bool
Modifiers: inline

whether a user can make a payment.

Returns: bool

inAppPurchase.finishAllTransactions ()

Full Usage: inAppPurchase.finishAllTransactions ()

Modifiers: inline

Completes all pending transactions.

inAppPurchase.finishTransactionByDate date

Full Usage: inAppPurchase.finishTransactionByDate date

Parameters:
    date : string

Modifiers: inline

Completes the pending transactions corresponding to the date.

date : string

inAppPurchase.getProducts productIDs

Full Usage: inAppPurchase.getProducts productIDs

Parameters:
    productIDs : string[]

Returns: Promise<Product[]>
Modifiers: inline

Resolves with an array of Product objects.Retrieves the product descriptions.

productIDs : string[]
Returns: Promise<Product[]>

inAppPurchase.getReceiptURL ()

Full Usage: inAppPurchase.getReceiptURL ()

Returns: string
Modifiers: inline

the path to the receipt.

Returns: string

inAppPurchase.offTransactionsUpdated handler

Full Usage: inAppPurchase.offTransactionsUpdated handler

Parameters:
Modifiers: inline

Emitted when one or more transactions have been updated.

handler : IOnTransactionsUpdated -> unit

inAppPurchase.offTransactionsUpdated handler

Full Usage: inAppPurchase.offTransactionsUpdated handler

Parameters:
Modifiers: inline

Emitted when one or more transactions have been updated.

handler : Event -> Transaction[] -> unit

inAppPurchase.onTransactionsUpdated handler

Full Usage: inAppPurchase.onTransactionsUpdated handler

Parameters:
Modifiers: inline

Emitted when one or more transactions have been updated.

handler : IOnTransactionsUpdated -> unit

inAppPurchase.onTransactionsUpdated handler

Full Usage: inAppPurchase.onTransactionsUpdated handler

Parameters:
Modifiers: inline

Emitted when one or more transactions have been updated.

handler : Event -> Transaction[] -> unit

inAppPurchase.onceTransactionsUpdated handler

Full Usage: inAppPurchase.onceTransactionsUpdated handler

Parameters:
Modifiers: inline

Emitted when one or more transactions have been updated.

handler : IOnTransactionsUpdated -> unit

inAppPurchase.onceTransactionsUpdated handler

Full Usage: inAppPurchase.onceTransactionsUpdated handler

Parameters:
Modifiers: inline

Emitted when one or more transactions have been updated.

handler : Event -> Transaction[] -> unit

inAppPurchase.purchaseProduct (productID, ?opts)

Full Usage: inAppPurchase.purchaseProduct (productID, ?opts)

Parameters:
    productID : string
    ?opts : U2<int, Opts>

Returns: Promise<bool>
Modifiers: inline

Returns true if the product is valid and added to the payment queue.You should listen for the transactions-updated event as soon as possible and certainly before you call purchaseProduct.

productID : string
?opts : U2<int, Opts>
Returns: Promise<bool>

inAppPurchase.restoreCompletedTransactions ()

Full Usage: inAppPurchase.restoreCompletedTransactions ()

Modifiers: inline

Restores finished transactions. This method can be called either to install purchases on additional devices, or to restore purchases for an application that the user deleted and reinstalled.The payment queue delivers a new transaction for each previously completed transaction that can be restored. Each transaction includes a copy of the original transaction.

Type something to start searching.