d4c0d312 d4c0d312 - 1 month ago 14
Android Question

How can i make a payment using Android Pay to my Stripe account in test mode?

At the moment i have followed the instructions in the Stripe SDK Docs and i used the test Stripe account and the test Wallet environment.

Once i get the test token back(in the FullWallet object) - which is just a plain text string "Test Token" i try to send it to my API on my server which makes the final payment call.

However that never gets registered in my Stripe Test Dashboard.

What am I doing wrong? No error messages. Is it possible to register a payment with test token ?



At the moment, there's no way to run a test end-to-end through Android Pay. In test mode, when you generate a test token, Google will always send back the fake token with the id set as TEST_GATEWAY_TOKEN. This is not a valid token id and you can't send it to your server to charge it.

If you get that id, it usually means that your application is configured properly. In that case, what Stripe recommends is to then create a separate token through the API for one of Stripe's test card and then let your server charge that specific token to pretend you went through the flow end-to-end.

From what I've heard, this is something that Stripe and Google are working on improving so that Test mode works properly in the future but no firm timeline.