Payments
The boilerplate comes with 2 types of payment systems supported via Revenue Cat:
- In App Payments
- Subscriptions
RevenueCat provides a backend and a wrapper around Google Play Billing to make implementing in-app purchases and subscriptions easy to manage and not require any backend code to run. You can easily customize the UI of your payments page through the RevenueCat dashboard.
In order for RevenueCat's servers to communicate with Google on your behalf, you need to provide a set of service credentials. The process for configuring these credentials is a bit complex, but the added level of control improves security by providing RevenueCat with only the access they need.
To be able to test payments you need to have an account created on the Google Play console and have the app published to a Closed Testing Track. This requires to pay a nominal charge of $25 and gives you a lifetime access to be able to publish apps on the Play Store. It can take up to 36 hours for your Play Service Credentials to work properly with the Google Play Developer API. You may see "Invalid Play Store credentials" errors (503 or 521) and be unable to make purchases with RevenueCat until this happens.
Setup
Note that this setup takes place on both the Google Play Console and the Google Cloud Console. Due to the nature of the process, there’s some switching back and forth between each console that can’t be helped, but each step will make clear which console you should be looking at.
You can follow the in-depth documentation provided by Revenuecat here (opens in a new tab) or watch the first 15 minutes of the tutorial below