#Zakariya-Webhook

1 messages · Page 1 of 1 (latest)

pliant delta
#

Hi there, you can listen to the checkout.session.completed event and expand the line_items

potent cradle
#

request sent in the stripe dashboard webhook event isn't showing line_items

pliant delta
#

You need to expand this property, it's not included by default

potent cradle
#

hey can I send the user address to the client side after payment intent is succeeded?

#

All I want is the information after the checkout is done so that I can store that in my DB

#

and in that I just need the address rest of the stuff I can grab from my cart.

pliant delta
#

You can also expand the customer hash, from there you can retrieve the address.

potent cradle
#

How can I do that?

pliant delta
#

you can expand multiple hashes. For instance, you can use the following code to expand both customer and line_items

const session = await stripe.checkout.sessions.retrieve(
'cs_test_TEST', {
expand: ['customer', 'line_items']
}
);

potent cradle
#

This can be done on the sever side? I need the address information on the client side. How do I pass this information on the client side. or simply a copy of the checkout session or at least only the address to the client side

#

once the payment intent is succeeded

#

or can I just send the payment Intent to the client side? It also has the billing details holding the address