Skip to content Skip to sidebar Skip to footer

How To Check If Transaction Is Made With Test Account Purchase Or With Real Account Purchase?

I am making an In-app purchase test with test account but the response from google is same as the purchase made from real account. How to check if the purchase is test based on the

Solution 1:

Yes, you can check that from the purchaseType field of the Google's Purchases.subscriptions API response refer.

Field: purchaseType

Type: integer

Description: The type of purchase of the subscription. This field is only set if this purchase was not made using the standard in-app billing flow. Possible values are: 0 = Test (i.e. purchased from a license testing account)

As Google suggests, You have to develop a web server from where you can get a comprehensive list of fields. If you want to know more about the web server follow then refer to my this answer.

Post a Comment for "How To Check If Transaction Is Made With Test Account Purchase Or With Real Account Purchase?"