Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Purchases.subscriptions api: What does paymentState null means?

I am dealing with Google In App Purchase and I stumbled upon an interesting issue.

I am working on server side checking for IAP subscription status and I am using this API as documented by google:

https://developers.google.com/android-publisher/api-ref/purchases/subscriptions

all is fine with the documentation, but this:

enter image description here

it did clearly mention what possible returns for paymentState. However, it did not mention what it means when paymentState is null.

Anyone out there knows what paymentState null?

One thing I could infer is that paymentState null could mean the user has requested a refund. But I want to be sure before jumping to that conclusion.

P.S: PaymentState for cancelled subscriptions does not make paymentState to null.

like image 982
Eugene Avatar asked Apr 09 '26 04:04

Eugene


1 Answers

According to googleplay developer support,

At present we do not provide a paymentState if the subscription is lapsed, paymentState is intended to reflect the payment state of the currently active subscription order. Since there is no "current" order for an expired subscription (only historical ones), we leave this field blank.

The technical team are now working to update the documentation to include this information, to better clarify that it is not provided for canceled, expired subscription

So yea, looks like it's null when the subscription is canceled or expired.

like image 199
Takehiro Adachi Avatar answered Apr 11 '26 17:04

Takehiro Adachi