diff --git a/README.md b/README.md index 952ac5b..9ddafc5 100644 --- a/README.md +++ b/README.md @@ -154,13 +154,14 @@ The function is called asynchronously, and it returns a `Result` object with a ` #### Restore Purchases -The `restorePurchases()` function helps to recover your app user's previous purchases without making them pay again. Sometimes, your app user may want to restore their previous purchases after switching to a new device or reinstalling your app. You can use the `restorePurchases()` function to allow your app user to easily restore their previous purchases. +The `restorePurchases()` function helps to recover your app user's previous purchases without making them pay again. Sometimes, your app user may want to restore their previous purchases after switching to a new device or reinstalling your app. You can use the `restorePurchases()` function to allow your app user to easily restore their previous purchases by providing the `customer` object as a parameter. To retrieve **inactive** purchases along with the **active** purchases for your app user, you can call the `restorePurchases()` function with the `includeInactivePurchases` parameter set to true. If you only want to restore active subscriptions, set the parameter to false. Here is an example of how to use the restorePurchases() function in your code with the `includeInactivePurchases` parameter set to true. ``` dart try { - final result = await Chargebee.restorePurchases(true); + final customer = CBCustomer('id','','',''); + final result = await Chargebee.restorePurchases(true, customer); print("result : $result"); } on PlatformException catch (e) { print('Error Message: ${e.message}, Error Details: ${e.details}, Error Code: ${e.code}');