question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to distinguish test order and real order through billing service?

See original GitHub issue

We maintained a list of licensed Playstore email accounts on Google Play Console. These accounts are exempted from charges on credit card when they complete a payment flow in the app. They also see message This is a test order, you will not be charged on the dialog. Upon successful billing, at onPurchasesUpdated, we will get Purchase where the orderId field is empty. This is how we previously distinguished test order from real order.

Just recently, I found that for test order, orderId is no longer empty but a seemingly legit values that starts with GPA.xxx.

I look through the values provided by Billing service and it seems like there is no data which indicates if this order is test order.

I am currently using 'com.android.billingclient:billing:dp-1'. It is still written in the javadoc that

/**
   * Returns an unique order identifier for the transaction. This identifier corresponds to the
   * Google payments order ID. If the order is a test purchase made through the In-app Billing
   * Sandbox, orderId is blank.
   */

Would appreciate if anyone encountered the same issue and has more insights to this, and how do you distinguish real order and test order based on the receipt or from billing service. Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
trungnn307commented, Jul 19, 2018

@jessie345 You can check here GooglePlay API .The param you need to check is “purchaseType”

3reactions
netomarincommented, Sep 23, 2017

@yurain this is working as designed and we are not going to change behavior, sorry. But, we appreciate your feedback and we are studying another way to help developers to identify test purchases, probably using the server-side API.

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Placing a test order - Shopify Help Center
You can place a test order using a real payment provider, and then immediately cancel and refund the order. You might be subject...
Read more >
Difference between 'ordering/referring provider' and 'billing ...
A: An ordering/referring provider is the individual who orders or refers an item or service for a Medicare beneficiary (e.g., ...
Read more >
Medicare Claims Processing Manual - CMS
Carriers, FIs and A/B MACs are responsible for applying the correct fee schedule for payment of clinical laboratory tests. FIs/AB MACs must ...
Read more >
Exploring the Fundamentals of Medical Billing and Coding
The medical billing and coding cycle can take anywhere from a few days to ... Coders connect physician order entries, patient care services, ......
Read more >
Test your Google Play Billing Library integration
A successful purchase where the user receives an item. With a license tester, you can use the Test instrument, always approves payment method....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found