#Meldin
1 messages ยท Page 1 of 1 (latest)
Hello! How are you integrating with stripe? are you using checkout?
Yes
const session = await stripe.checkout.sessions.retrieve(id);
const payment = await stripe.paymentIntents.retrieve(session.payment_intent);
I am getting a lot of data but I cannot see the items
If you want to see the list of items you need to retrieve the Checkout session and expand line_items
If you're not familiar with expansion already you can read more about it here https://stripe.com/docs/expand
Nice const items = await stripe.checkout.sessions.listLineItems(id);
I am getting name, price. qty etc, but not the image, does stripe support that?
I believe you'd have to expand data.price.product since the product is what has the images attribute
I got it. const session = await stripe.checkout.sessions.retrieve(id,{
expand: ['customer','payment_intent','line_items','line_items.data.price.product.images']
});
thank you so much
๐
And I am sorry what is considered an order confirmation number?
I don't htink we have a specific attribute for a confirmation number - can you be more specific?
When user make a purchase he should get a confiramation number?
Do you mean like a receipt number?
We generate things like receipt numbers and invoice numbers, but if you want your own concept of a confirmation number that would be something you generate yourself and pass in as metadata on the Checkout Session so you can reference it later
๐