IapModel

Description: The IapModel represents an in-app purchase.

Fields:

  • IapInfo info - Info about the in-app purchase. Contains the following fields:
    • string name - The name of the in-app purchase.
    • int price - The price of the in-app purchase, in credits.

Methods:

  • Promise<TransactionModel> Purchase() - Purchase this in-app purchase. Returns a Promise to a TransactionModel. This will generate a call-out to the website, to confirm the user's intent to purchase. See the Monetization section for more details.