android-inapp-billing-v3 icon indicating copy to clipboard operation
android-inapp-billing-v3 copied to clipboard

How can i get "paymentState" after successfully subscribe the app?

Open getyoteamsolutions opened this issue 6 years ago • 4 comments

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 avatar Nov 11 '19 06:11 getyoteamsolutions

@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.

mouselangelo avatar Feb 27 '20 17:02 mouselangelo

Any update on this? Never get paymentState other than 1. The trial one even without acknowlegment is always 1. Why is it happening?

nzackoya avatar Mar 23 '20 17:03 nzackoya

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.

mouselangelo avatar Mar 23 '20 17:03 mouselangelo

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

mouselangelo avatar Mar 23 '20 17:03 mouselangelo