#hchen
1 messages · Page 1 of 1 (latest)
Hi, what are you really trying to do? Like, there is not a a direct way to pass a Payment Method like we show here, https://stripe.com/docs/testing?testing-method=payment-methods#cards for wallets but you can add your card to the browser/wallet to then use it to test your integration with Apple or Google Pay.
So I'm talking more about things like integration tests. Server side, I am writing tests and want to create a PaymentMethod object in Stripe's test environment and have it be Apple Pay. For example in Java, I want to use the PaymentMethodCreateParams object that the Stripe SDK offers to create a PaymentMethod.
You cannot directly use the Payment Method Create API. Apple Pay and Google Pay are included in the card payment method type. You can use SetupIntent, and as long as you met the requirements such as enabling Wallets Payment Methods, https://dashboard.stripe.com/test/settings/payment_methods and have a card on your Google Pay account or add a card to your Wallet for Safari etc., it would show up. You'd then use that Payment Method which is wallet from the SetupIntent to then use it for future purchases.
So it's impossible to create a PaymentMethod with a wallet type purely from the server? I get that during end-to-end testing with a UI (like Safari on Web) we can, but I'm only speaking for writing tests server side with no client involvement like Safari.
That is correct, this is not possible
Thanks! Just checking.
Would it be possible to add a test card that would return a Wallet type in Stripe's test cards?
https://stripe.com/docs/testing?testing-method=payment-methods#cards