#carson - PRB with Shipping

1 messages · Page 1 of 1 (latest)

near mica
#

Hi 👋

#

Can you share a payment intent ID for a payment where the user provided shipping info?

tacit heath
#

right now im just creating a setup intent that will get captured shortly after

#

but here's the customer with the payment method captured cus_MET2FzTm6v8d01

#

basically for our use case, im creating a setup intent on the front end, and then the backend makes the payment intent

#

right now im just testing the front end piece

near mica
tacit heath
#

ah, i see

#

so setupintents cant capture this type of data?

#

and i can't send through shipping options as a key in a language like php? only on the front end in JS?

near mica
#

This feature of the payment request button returns the shipping address info back to the client because it isn't passed to Stripe by the digital wallets AFAIK. So Stripe doesn't have access to it on our servers. You need to capture it on the client. You can pass it back to your server and make the API calls to Stripe to update the customer from there.

tacit heath
#

ok cool, so i should listen for that shippingaddresschange to capture? or is it part of the success response?

near mica
#

Nope. Returning the shipping info as part of the Payment Response is necessary because, once the digital wallet modal loads, Stripe.JS has no access to what the user enters there.

tacit heath
#

so you're saying i should listen to shippingaddresschange? because if im creating a setupintent, i don't get any of that info as the response

near mica
#

What shippingaddresschange? Is this a JS event? A Stripe event?

tacit heath
#

scroll down a little bit on that section

near mica
#

Okay, JS event. yes that is how you should approach collecting this information. Then you can pass it back to your server and associate it with the user.

tacit heath
#

awesome, thanks so much for your fast responses and help!