Acampoh
Acampoh

Reputation: 669

android in-app billing sandbox

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.

Upvotes: 7

Views: 6435

Answers (4)

sharmaDev2506
sharmaDev2506

Reputation: 81

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/

Upvotes: 0

Raigex
Raigex

Reputation: 1215

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.

Upvotes: 3

gadget
gadget

Reputation: 2102

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

Upvotes: 1

Blundell
Blundell

Reputation: 76506

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!

Upvotes: 17

Related Questions