#Meldin

1 messages ยท Page 1 of 1 (latest)

odd ridgeBOT
frail terrace
#

Hello! How are you integrating with stripe? are you using checkout?

hot egret
#

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

frail terrace
#

If you want to see the list of items you need to retrieve the Checkout session and expand line_items

hot egret
#

Nice const items = await stripe.checkout.sessions.listLineItems(id);

#

I am getting name, price. qty etc, but not the image, does stripe support that?

frail terrace
#

I believe you'd have to expand data.price.product since the product is what has the images attribute

hot egret
#

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

frail terrace
#

๐Ÿ‘

hot egret
#

And I am sorry what is considered an order confirmation number?

frail terrace
#

I don't htink we have a specific attribute for a confirmation number - can you be more specific?

hot egret
#

When user make a purchase he should get a confiramation number?

frail terrace
#

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

hot egret
#

ahaaa ok

#

thank u

frail terrace
#

๐Ÿ‘