syncPurchases

This method will send active subscriptions and unconsumed one time purchases to the RevenueCat backend. Call this when using your own implementation for subscriptions anytime a sync is needed, such as when migrating existing users to RevenueCat. The SyncPurchasesCallback.onSuccess callback will be called if all purchases have been synced successfully or there are no purchases. Otherwise, the SyncPurchasesCallback.onError callback will be called with a PurchasesError indicating the first error found.

Note: For Amazon, this method will also send expired subscriptions and consumed one time purchases to RevenueCat.

Parameters

listener

Called when all purchases have been synced with the backend, either successfully or with an error. If no purchases are present, the success function will be called.