This module provides functionality for user payments through Apple App Store.

It is available only on Snipe Kit server.

Constructor

Methods

notify (c:ClientKit, params:Params):Dynamic

kit/payment/apple.notify

Notifies server about Apple App Store payment completion. Checks for payment validity and gives payment rewards.

Input:

  • receipt - String. App Store receipt. Can contain multiple transactions.

Output:

Note: If the receipt contains multiple transactions, client will receive a separate message for each one.

  • errorCode - String. Operation error code.
  • token - String. Received purchase token.
  • itemID - String. Payment item string ID. Returned only on success.

Error codes:

  • ok - Operation successful.
  • noSuchItem - No payment item with this string ID.
  • transactionExists - Transaction with this ID was already handled.
  • serviceError - Apple payment API returned an error or was not available.
  • purchaseCancelled - This purchase was cancelled.