Synchronise purchases made outside of the app (redempt ios offer codes via URL)

  • 28 February 2023
  • 3 replies

Badge +1

Hello, we’ve recently implemented ios subscription offer codes, to give user a free trial for a certain amount of time. While testing the testflight version (ready to submit), and trying out those production offer codes, the user is redirected to the app store ( and purchases the subscription successfully...but when returning to the app it seams like RC does not catch that purchase and therefor user has no premium content access (I suppose RC does not receive the users track receipt and therefore can not send webhook for this event). We were being advised from your support to sync the user (call syncPurchases method before the user leaves the app and after the purchase (on foreground)), but I’ve came across the docs saying that we should not call sync purchases progammaticaly (

) so can you please expain how to use it the proper way inside our React Native app. thanks

3 replies

Userlevel 2
Badge +7


We’ve updated our docs here on the recommended way to handle this, which is to call syncPurchases programmatically similar to what was mentioned in support.

When users click your link within your app to redeem the offer code, it will take them outside of the app to complete the purchase. It is important to call syncPurchases when the user returns back to your app to retrieve their purchase. This may be done by recording when the user leaves the app due to the link, and calling syncPurchases when the user returns to the app. If not, the user may need to trigger a restore within your app when they come back.


I didn’t see in the post you shared mentioned where it was mentioned not to call syncPurchases programmatically. However, we do mention that about restorePurchases,

The restorePurchases method should not be triggered programmatically, since it may cause OS level sign-in prompts to appear, and should only be called from some user interaction (e.g. tapping a "Restore" button.)


We also mention about syncPurchases that it is the way to programatically trigger a restore,

syncPurchases is a method we provide in our SDK which allows you to programmatically trigger a restore. This method, much like restorePurchases, reactivates any content that had previously been purchased from the same store account (Apple, Google, or Amazon).


(was a little lengthy here for those that may come later on)

Badge +1 there is a section bellow that mentions this 


Userlevel 2
Badge +7

Thank you for pointing this out! This note was meant to discourage users from calling syncPurchases on every app launch for every app user when doing a migration. Calling it in the cases that a user leaves the app via offer code link and returns is perfectly fine, and the only alternative to having the user hit restore manually if the app does not pick it up.