I followed

Step-by-Step Android In-App Purchase Integration with RevenueCat

ref

Google Play Store | In-App Subscriptions Made Easy – RevenueCat