#Indikakis2
1 messages · Page 1 of 1 (latest)
Yep, unfortunately the Payment Element doesn't support that flow. It can't create Payment Methods directly
I want to use 'payment' element and check for duplicates and if it's a duplicate payment method then just pass it to 'confirmpayment' without adding duplicates.
You'd still just useconfirmCardPayment: https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-existing
Yes, I can use confirmCardPayment but how do I get a fingerprint from a payment element
I guess the only way to do what you want with Payment Element would be to use auth/capture
e.g. create a Payment Intent with capture_method: 'manual', collect payment details and confirm. Check the PM object fingerprint server-side, and if duplicate cancel (or capture with another PM).
Thank you so much. I will check this and if I got any question I will ask. Thank you.
np!
Hi I did go through capture_method document. I do understand capture process, and how to pass it a payment_method and set confirm before make capture the amount. But again if the mounted element is a 'payment' element is there any chance to create a paymentmethod from it?
no there is not
at some point we will make this beta into a public feature : https://stripe.com/docs/payments/run-custom-actions-before-confirmation which will help with use cases like inspecting the card before payment, but today it's not possible when using the Paymentlement
That's a good news. Thanks. If I mounted a card element and allows apple pay, Google pay via dashboard would users be able to pay using the apple pay button when they are on a apple device ( in fact I also want a confirmation whether the apple pay button appear or not when we mount a card element)
Accepts card payments using Wallets?
no, the CardElement only supports cards , not wallets
you'd have to integrate https://stripe.com/docs/stripe-js/elements/payment-request-button additionally on the page to support those wallets
OK, got it. So if I want handle duplicates then I have to giveup 'payment' element and then add card element and a payment-request-button. But why stripe do not handle duplicate payment methods?
So if I want handle duplicates then I have to giveup 'payment' element and then add card element and a payment-request-button.
yes or try the workaround with auth-and-capture my colleague mentioned
But why stripe do not handle duplicate payment methods?
we just don't today, common feature request for years but is just not how the product has evolved
OK, thanks, one more thing. I would appriciate if you can make the card element appear same as it apear when a 'payment' element is being mounted. The card element do not look nice on frontend and has few fields. I know we can add styles but still not the same look and feel
I mean that won't happen, what will happen is that we will make this beta into a public feature : https://stripe.com/docs/payments/run-custom-actions-before-confirmation which will help with use cases like yours
until then there's no great solution unfortunately, the PaymentElement just doesn't work for certain use cases so you have to use the lower level integrations