I am making an Android app that sells an in-app monthly subscription. Before I dive into it too much, does this outline of how this should be done seem about right? I am using the Google Play Android Developer API.
The first time the app is installed, send the following in sendBillingRequest():
When the user makes a purchase:
Each time the app is started up, check if you have a saved purchase token.
If the purchase token doesn't exist:
If the purchase token exists, check the expiration date and initiation time:
Open the Google Play app. Choose Account -> Subscriptions & Payments -> Subscriptions. Click your test subscription and change the payment method to “Test card, always declines.” After five minutes, payment should be declined.
When you are testing in app purchases on Android, you must use a signed version of the app. Your Google Play email must be listed in the Google Play Console as a tester. The easiest way to do this is to publish your app to a Beta release with open testing.
Yes I am.
I have successfully implemented in-app billing this way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With