Question

I'm developing a simple in-app billing library. It works with static responses from google, but now I'd like to test this lib with real in-app products.

I have created a test account and I'm trying to buy a product, but google Play is asking me for a credit card. Is there any way to test in-app billing without using a real credit card (a sandbox environment, fake credit card, etc)?

I have read here that the only way to test this is using a real credit card with a test account (so you don't have to pay google taxes) and once you have bought the product, refund it again, but it seems not to be a very 'developer-friendly' way.

Thanks.

Was it helpful?

Solution

Nope it absolutely SUCKS

You have to use a real credit card, then go into Google Play , select View Merchant Account and hit the individual order then refund to get your money back.

sorry!

OTHER TIPS

As of today (or yesterday) Google has finally allowed "sandbox" testing of in app purchases, it goes through all the steps of an in app purchase except the actual charging of the credit card. Although you will probobly have to wait for the cancelations/refunds like you did before.

More info here and here

Got this info from my developers console.

... and to add to Blundell's answer, it will take close to 6 hrs for refund to be posted, and then you'll probably want to give it another 6 hours before attempting the purchase.... or else.... Or else, what? Oh, I don't know, something like the "you already own this item" bug/glitch/bane of my existence

You can test in-app purchase subscription using testing accounts. For reference please go through the link- You may use sandbox testing by adding you testers account to play console. Go to the play console main screen--> setting--> search for license testers--> add your testers email-id there. Then go to your app release-> go for your beta/alpha release. Tap on manage testers and share opt-in URL with testers to accept an invite.

https://cheesecakelabs.com/blog/google-play-iap-first-setup-test-sandbox/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top