#thekents_api

1 messages ยท Page 1 of 1 (latest)

serene orbitBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1230085109768650792

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

lusty sandal
#

Metadata isn't empty since metadata is available in dashboard

dim scaffoldBOT
lusty sandal
#

object that i receive on get

#

req that creates session:
req_g9VxbO5IcVVT9S

severe dove
#

the metadata you're referring to are from the Product

#

not from the line_item itself

#

you need to open the price object

#

and look under price.product

lusty sandal
#

and fetch product by that id then?

severe dove
#

you can expand on line_items.data.price.product

#

if the product data are not present

lusty sandal
#

like so?

checkoutSessionCompleted.id, {
    expand: ["line_items", "invoice", "line_items.data.price.product"],
  });```
severe dove
#

you don't need to add "line_items" twice

#

expand: ["invoice", "line_items.data.price.product"], is enough

lusty sandal
#

Alright, I'll test it out, thanks ๐Ÿ™‚

severe dove
#

let me know if you need any more help

lusty sandal
#

Yeah, I got it working now. Thanks again

severe dove
#

sure let me know if you need any more help

serene orbitBOT