android-inapp-billing-v3
android-inapp-billing-v3 copied to clipboard
How can i get "paymentState" after successfully subscribe the app?
IN my app I need to know that in-app subscription is Free_Trail of not for that I found "paymentState" field where I can see
The payment state of the subscription. Possible values are: 0 Payment pending 1 Payment received 2 Free trial 3 Pending deferred upgrade/downgrade
Now how can I retrieve this after successfully purchase a subscription!!!
@getyoteamsolutions This was a long time ago - but to get the status of subscriptions you have to use the Google Play Developer API. The ideal option would be to setup Realtime developer notifications from your app's server. Then you receive updates (almost) in real-time.
Any update on this? Never get paymentState other than 1. The trial one even without acknowlegment is always 1. Why is it happening?
Any update on this? Never get paymentState other than 1. The trial one even without acknowlegment is always 1. Why is it happening?
I’m guessing what you are receiving is the purchaseState which is different from paymentState.
To get the paymentState you will need to use the Google Developer API which is separate from the Google Play Billing API.
BTW this library is based on the very old AIDL library which is now deprecated. If you are implementing this in a new app, it’s easier and better to use the latest Google Play Billing library