ToruWatanabe
ToruWatanabe

Reputation: 53

Is it possible to remove all payment options from stripe Payment Element besides card?

We are trying to implement this approach: https://docs.stripe.com/payments/finalize-payments-on-the-server

Our goal is to have two flows. One is for card payment through Payment Element, second is for google/apple/amazon pay through Express Checkout Element.

That means that we need to hide all payment options on Payment Element besides Card payment. We were unable to find a way to do so. Payment intent with our approach is created on the server.

Is it possible to render Payment Element with only card as a payment option?

Upvotes: -1

Views: 19

Answers (1)

hanzo
hanzo

Reputation: 846

I believe you can use paymentMethodTypes parameter to set what payment methods are rendered via PaymentElement. You can set that parameter to just ['card']. You'd also want to make sure the PaymentIntent you create sets payment_method_types to ['card'] as well.

In order to disable Apple Pay / Google Pay wallets, you can set wallets parameter to never which should disable them on PaymentElement

Upvotes: 0

Related Questions