syncPurchases

This method will send all the 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.

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.