#tonz18

1 messages · Page 1 of 1 (latest)

versed spokeBOT
near agate
#

👋 happy to help

nocturne hearth
#

yes i have requestShipping: true but on server-side what is best way to get the shipping address?

#

or can we only collect via client-side?

near agate
nocturne hearth
#

Shipping returns null even though I can see shipping in dashboard.

near agate
#

would you mind sharing the PaymentIntent ID?

nocturne hearth
#

pi_3MZBWLE6MnzWAfRF1X1Lk7Uo

near agate
#

taking a look

nocturne hearth
#

thanks

near agate
#

sorry for keeping you waiting

nocturne hearth
#

all good, any results?

near agate
#

I was mistaken to assume that the shipping info would be automatically updated

nocturne hearth
#

haha same here

near agate
#

you would have to collect that info on the front-end by listening to the shippingaddresschange event

nocturne hearth
#

ohh, what about via webhook would shipping details come through there?

near agate
#

no not even

nocturne hearth
#

ohh very stange as the payment intent is already created before it pops up and my server doesnt do anything until payment is successful

#

Thanks for your help tho

near agate
#

yes you have a way of adding the shipping address on the front-end side

#

before the PI is confirmed

#

with the paymentmethod event

nocturne hearth
near agate
#

something like

 ...
 let shipping = paymentResponse.shippingAddress
 stripe.confirmCardPayment(secret, {shipping: {.... /* pull fields from `shipping` and pass into this hash */}})
 ...
})```
near agate
#

this all happens on the front-end side

nocturne hearth
#

paymentRequest.on('paymentmethod'
does that include the shipping?

near agate
#

yes paymentResponse does have the shippingAddress

nocturne hearth
#

ohh yes I see it now

near agate
#

let me know if you need any more help

nocturne hearth
#

can that shipping address ever change after paymentResponse

#

eg if requiring 3d

#

or paymentIntent.status === "requires_action" can user return and change address

near agate
#

we're speaking about PRB here so Google/Apple Pay and Link

nocturne hearth
#

yeah

near agate
#

the paymentmethod event happens after the customer is done interacting with the browser’s payment interface.

nocturne hearth
#

the paymentmethod happens before stripe.confirmCardPayment correct?

near agate
#

yes

nocturne hearth
#

so it would be safe to assume that paymentIntent.status === "requires_action" would only happen when there is a failed payment then as it PRB