#kamesh-paymentelement-deferred
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
@plush crow hello! Do you have a specific question instead of 2 docs links? Sorry hard to help you with something meta
The former is a doc on our PaymentRequestButton which is a specific element UI for wallets like Google Pay and Apple PAy. The latter is for PaymentElement which is a separate element UI
sorry got the wrong link i think. do we have similar callback event to get payment method from Stripe SDK once the user complets the payment element flow screens (prior to confirming the payment intent()
so that we can complete payment confirmation through the back channel
I'm sorry, I don't really get what you are asking unfortunately. Can you try and take a step back and clearly summarize what you need help with all in one message?
we are in the process of building payment element flow (currently using payment request)
Please try and pause
I am asking you to write a clear end to end summary of the clear question(s) you have. Not one or two short sentences at a time a minute a part. This pushes you to make sense of the overall thing and allows me to help you
once the SDK captures the payment method based on the user action, we would like to get the payment method id, and then handle rest of the payment confirmation (create and confirm payment intent) through our backend
So what's the problem? Sorry you wrote a sentence but not really the full question, didn't share code or said what was blocking you. What exactly do you need help with?
I am still typing, please hold on
In the link https://stripe.com/docs/payments/finalize-payments-on-the-server?platform=web&type=payment#create-pm there is an option to create payment element using StripeJS.
In payment request, there is an option to listen to an event and receive the payment method id from SDK as per the link https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html#html-js-complete-payment
Is there any such event we can listen to in payment lement?
All good, that's why I asked you to try and write a clear summary all in one message as I can't eally know when you are done or not otherwise
You have PaymentElement and you explicitly create a PaymentMethod and you get the pm_123 back. There's no reason to look for an event in this flow
kamesh-paymentelement-deferred
so there is no such event in payment element?
No it doesn't really make sense to want or need an event in this flow. Your code calls a method to get a PaymentMethod object which you get. It's functionally identical
Did you try the integration? If so what's not working as you'd expect and can you share the exact bit of code where you are blocked?
both are not same. one is giving us the payment method and other we need to explicitly request for a payment method.
I mean we don't magically give you a payment method, it's the result of an action in the browser, which is really functionally similar
since we are migrating from payment request, we are trying to keep the functionality similar and this is the reason why we are trying to find if similar event exists?
I assume there is none. Thanks for the clarification.
Gotcha so yeah there's no callback because in that flow you control when the PaymentMethod is created. But I don't really see much difference honestly
ThaNKS