#usmseong_29857
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.
- usmseong_29857, 25 minutes ago, 7 messages
- usmseong_29857, 2 hours ago, 13 messages
Hello! Yes. The billing details will be on the resulting Payment Method: https://stripe.com/docs/api/payment_methods/object#payment_method_object-billing_details
seems this is only available for Payment Intent. wonder if it's available for a Set Up Intent as well
Not sure I understand?
This is on the Payment Method, not a Payment Intent.
A successful Setup Intent will produce a Payment Method that's set up for future use.
sorry what I mean is this part from https://stripe.com/docs/payments/accept-a-payment-deferred
const {error: submitError} = await elements.submit();
if (submitError) {
handleError(submitError);
return;
}
// Create the PaymentIntent and obtain clientSecret
const res = await fetch("/create-intent", {
method: "POST",
});
const {client_secret: clientSecret} = await res.json();
// Confirm the PaymentIntent using the details collected by the Payment Element
const {error} = await stripe.confirmPayment({
elements,
clientSecret,
confirmParams: {
return_url: 'https://example.com/order/123/complete',
},
});
in this onSubmit handler I'd like to retrieve billing information after this and before calling one of my endpoints
That's not how it works. When you call stripe.confirmPayment the browser will navigate away from this page and all of the JavaScript on it will no longer run.
The navigation will be to whatever page is required to complete the payment, like a bank's site, and after that they'll land on your return_url. If no other page is required they'll go straight to your return_url. Either way, though, it's a full page navigation and the code on this page won't run beyond stripe.confirmPayment.
ahh I see. Thank you for clarification