Skip to main content

we are now planning to implement in-app purchases for mobile using RevenueCat. Given this change, how can we handle the trial plan assignment to a user on register via the backend while integrating with RevenueCat’s in-app purchase system? 

 

any API ?

Hi ​@james-,

Depending on the store, you likely won’t need to do anything additional to ensure that an eligible user can take advantage of the trial. You can see in our documentation how to set up free trials or introductory offers for various stores here: https://www.revenuecat.com/docs/subscription-guidance/subscription-offers


hello ​@kaitlin 

I want to assign a trial using the API instead of using the SDK.


Hey ​@james-,

Thanks for specifying. This can be done through the POST /receipts API, using the same process that you would for any purchase, by sending along the fetch token and the app user id: https://www.revenuecat.com/docs/api-v1#tag/transactions

With this information, RevenueCat would be able to tell that it is a trial period and reflect this in the customer history correctly.