#Zakariya-Webhook
1 messages · Page 1 of 1 (latest)
Hi there, you can listen to the checkout.session.completed event and expand the line_items
request sent in the stripe dashboard webhook event isn't showing line_items
You need to expand this property, it's not included by default
This is how you expand the response https://stripe.com/docs/api/expanding_objects?lang=node
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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.
You can also expand the customer hash, from there you can retrieve the address.
How can I do that?
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']
}
);
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