#jakub-ece-shipping
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.
- jakub_50765, 2 days ago, 5 messages
Hello! Do you have an example I can take a look at as well as the code for your express checkout element?
Hello, may I send you PaymentIntent id you can take a look?
Yup!
ok, for instance this PI please
pi_3OKyq6JFrL6Qq8J10JXJ7862
it seems, customer hasn't got address set in ApplePay
The behavior you're seeing is expected - Apple Pay is really sensitive to privacy, so it'll strip out some information that they decide isn't necessary for calculating shipping. We talk about this here: https://stripe.com/docs/js/elements_object/express_checkout_element_shippingaddresschange_event#express_checkout_element_on_shipping_address_change-handler-address
ok makes sense but why I can't see customer address even in Stripe Dashboard?
We get the full billing address, but no the full shipping address (Apple completely hides it from us so you would only get a stripped version of it)
You should still see the billing address if open the payment in the dashboard https://dashboard.stripe.com/payments/pi_3OKyq6JFrL6Qq8J10JXJ7862
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
ah yeh, you are right, I can see it
but how can I get PaymentResponse object you mentioned above?
Which PaymentResponse object? Do you mean what I linked in https://stripe.com/docs/js/elements_object/express_checkout_element_shippingaddresschange_event#express_checkout_element_on_shipping_address_change-handler-address ?
yep
in confirm event of Express Checkout element I can confirmPayment method so payment is placed and then it redirects to returl_url
I call
After being redrected to the return_url I believe you should get query params in the URL that include the Intent ID and client-secret, which would allow you to retrieve them and get the full payment
jakub-ece-shipping
yeh, I've got these values - so I should call some API method? currently I call API to get paymentIntent and store address from response
Yes, you can either retrieve the Payment Intent client-side (using https://stripe.com/docs/js/payment_intents/retrieve_payment_intent) or you can send those values to your server and retrieve them with your secret key (https://stripe.com/docs/api/payment_intents/retrieve)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yeh, I do that but apparently I get stripped out shipping address
so is there any other way how to get full adress?
No, there's really no way for you to get this full address from Apple Pay (they're the ones that strip it out, Stripe gets the stripped out version as well).
You'd have to separately collect a full shipping address yourself if you need it
but you mentioned that PaymentResponse object contains full address, how can I get this response type?
because it is essential to have shipping address as we need to deliver products customer has paid for ๐
for instance this PI has got shipping address shown even though it is ApplePay as well
pi_3ONBaaJFrL6Qq8J11L2czngE
Ah! Sorry about that I missed that part about the PaymentResponse - in your code you're currently listening for a confirm event right?
yeh, and inside this event I call confirmPayment method ๐
When you log the event do you get the full shipping Address there?
hmm not sure though, do you think this could be a way how to get it?
Yeah, I'm thinking that's where you'd be able to get the full address
ok cool, I'll test this approach, thanks for your help ๐