-
Notifications
You must be signed in to change notification settings - Fork 4
API
Returns: bool
Returns true
if the user can make purchases or false
otherwise.
This will be false in cases such as parental restrictions on the device.
Returns: Promise<
RequestProductResult> object
Takes a single array of strings. Those strings must be products IDs as defined on iTunesConnect.
The function will return a promise which will resolved to a RequestProductResult
. That object contains the details of the products that can be bought and a list of all the ones that cannot.
See the Retrieving Product Information section of the User Guide for more details.
Returns: Promise<
SKPaymentTransactionInfo>
Returns: Promise<
SKPaymentTransactionInfo>
This will attempt a purchase of the product named by the productID
.
The optional applicationUserName
argument is used when you want to assist Apple's fraud detection systems. See the Detecting Irregular Activity section of the User Guide for more details
Returns: Promise<Array<
SKPaymentTransactionInfo>>
Returns: Promise<Array<
SKPaymentTransactionInfo>>
This sends a request to the App Store to restore all of your app’s completed transactions. The App Store generates a new transaction for each transaction that was previously completed.
See the Restoring Purchased Products section of the User Guide for more details
The optional applicationUserName
argument is used when you want to assist Apple's fraud detection systems. See the Detecting Irregular Activity section of the User Guide for more details
Returns: Promise<string>
Refreshing the receipt asks the App Store for the latest copy of the receipt. Refreshing a receipt does not create any new transactions. Although you should avoid refreshing multiple times in a row, this action would have same result as refreshing it just once.
The string will be success
on success and can be safely ignored
See the Restoring Purchased Products section of the User Guide for more details
Returns: Array<
ReceiptTransactionInfo>
Use this to get all the information the app has on what has been purchased.
This does not require any interaction from the user.
These are actually just plain old objects with fields, but we give them names here for convenience.
One of the following strings:
- "Purchasing"
- "Purchased"
- "Failed"
- "Restored"
- "Deferred"
-
productIdentifier
:string
-
quantity
:int
-
applicationUsername
:string
An object with the following fields
-
payment
: A SKPaymentInfo object -
transactionState
: a TransactionState string -
transactionIdentifier
:string
-
transactionDateUTC
:string
UTC time in ISO-8601 format -
error
: null or astring
An object with the following fields
-
quantity
:int
-
productIdentifier
:string
-
transactionIdentifier
:string
-
originalTransactionIdentifier
: `string -
purchaseDate
:string
UTC time in ISO-8601 format -
originalPurchaseDate
:string
UTC time in ISO-8601 format -
subscriptionExpirationDate
:string
UTC time in ISO-8601 format -
cancellationDate
:string
UTC time in ISO-8601 format -
webOrderLineItemID
:int
An object with the following fields
-
price
:string
-
priceLocale
:string
-
localizedDescription
:string
-
productIdentifier
:string
-
localizedTitle
:string
An object with the following fields:
-
valid
: an array of SKProductInformation. These are the successfully validated products -
invalid
: an array ofstrings
. These are the ids of the invalid products