syncAmazonPurchase static method
This method will send a purchase to the RevenueCat backend. This function should only be called if you are in Amazon observer mode or performing a client side migration of your current users to RevenueCat.
The receipt IDs are cached if successfully posted so they are not posted more than once.
@param productID Product ID associated to the purchase.
@param receiptID ReceiptId that represents the Amazon purchase.
@param amazonUserID Amazon's userID. This parameter will be ignored when syncing a Google purchase.
@param isoCurrencyCode Product's currency code in ISO 4217 format.
@param price Product's price.
@param purchaseTime Purchase time in milliseconds since epoch. Usage of this parameter is
highly recommended and usages without it are deprecated and will be removed in future versions.
Implementation
static Future<void> syncAmazonPurchase(
String productID,
String receiptID,
String amazonUserID,
String? isoCurrencyCode,
double? price, {
int? purchaseTime,
}) =>
_channel.invokeMethod(
'syncAmazonPurchase',
{
'productID': productID,
'receiptID': receiptID,
'amazonUserID': amazonUserID,
'isoCurrencyCode': isoCurrencyCode,
'price': price,
'purchaseTime': purchaseTime,
},
);