syncPurchases

expect fun syncPurchases(onError: (<Error class: unknown class>) -> Unit, onSuccess: (<Error class: unknown class>) -> Unit)

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 onSuccess callback will be called if all purchases have been synced successfully or there are no Otherwise, the onError callback will be called with a PurchasesError indicating the first error found.

Warning: This function should only be called if you're migrating to RevenueCat or in observer mode.

Warning: This function could take a relatively long time to execute, depending on the amount of purchases the user has. Consider that when waiting for this operation to complete.