I am integrating Paywall in an iOS app. Looking for suggestions/recommendations. My use case is that I want to show users of the app a paywall and then create and update related records in my backend database throughout the subscription lifecycle. I want to do this so that I can check subscription/consumption status from the database when API calls are made to the backend. Below are my questions:
- How do I create these records in my backend service? This (very detailed and awesome blog) https://www.revenuecat.com/blog/engineering/ios-in-app-subscription-tutorial-with-storekit-2-and-swift/ gives an example of making an API call to the backend on successful purchase. Is there a way to do something like this when using Paywall? I am thinking to create the first subscription record this way and then manage updates by exposing a webhook
- Are webhooks reliable and real-time? Is there any recommendation to use them (or not) as compared to forwarding apple’s server notifications from RC to my backend API?
- How do I identify and map the server notification I receive to a user for which the notification was sent?
- How do I got about deciding when to show the Paywall? I read that it can be done using metadata but couldn’t really find any examples. My use-case would be to remotely decide when to show users a paywall. For example, I would want to show when users complete onboarding and once when they’ve used a key feature X number of times. But I want to be able to enable/disable either of these without a code update
Thanks in advance!