#Nate.tsg
1 messages · Page 1 of 1 (latest)
You can do that without storing the Payment Element itself. You would simply create, confirm and attach a Payment Method to a Customer using the Payment Element.
This guide tells you how to do exactly that: https://stripe.com/docs/payments/save-and-reuse
I wanted to avoid confirm payment redirection on frontend and handle on the backend
Do you think it's possible to something similar to createToken with PaymentElement
I don't follow.
I wanted to avoid confirm payment redirection on frontend and handle on the backend
What do you mean by this? You can avoid redirection on your webpage with plain Javascript, so I'm trying to understand what you're wanting to achieve.
I wanted to store the token on the backend
What I want to achieve store the payment information of different payment methods then allow payment later on, can you point me how to avoid redirection while also getting the result status
What 'payment information' are you hoping to store specifically?
Credit and bank
You can't. That goes against PCI requirements. Literally every Stripe product is designed to mitigate the storage of raw bank/credit data
Yeah I don't want to store raw data, I wanted a method like createToken so I can track the tokenize data
Why doesn't the Payment Method ID work in this case? You cannot mitigate the redirection on confirmation step, as the user has to be on-session to authenticate their payment method.
It would work, I am just checking if there are ways I have missed any alternate ways, can you share the method to stop the redirection with plain Js and will it be possible to get the result status
With my test integrations I just included ev.preventDefault(); in my eventListener and performed the confirmation asynchronously
How were you able to make the confirmations asynchronously
By passing in the client secret from the Setup Intent to stripe.confirmCardPayment()
I think that might have been with the Card Element instead of the Payment Element though
You'll probably want to use this: https://stripe.com/docs/js/setup_intents/confirm_setup