#Jayy

1 messages ยท Page 1 of 1 (latest)

icy mortarBOT
formal copper
#
stripe.invoices.retrieve(req.query.id as string, {
  expand: ['lines.data.price.product']
})

Should do it

mint tiger
#

i'm trying to find the docs on expanding the data. could you send me a link for it too here please?

formal copper
mint tiger
#

Thank you ynnoj! appreciate the prompt help

mint tiger
#

ummm 1 more question. Does the test mode put a really old date on invoices and everything else ?

mellow linden
#

Hello ๐Ÿ‘‹
Taking over as ynnoj had to step away
Not sure what you mean by following

Does the test mode put a really old date on invoices and everything else ?
can you elaborate?

mint tiger
#

alright so i'm doing the following :

 const invoice = await stripe.invoices.retrieve(req.query.id as string, {
      expand: ['customer', 'lines.data.price.product', 'payment_intent'],
    })
// invoice in this case has this as invoice.create: `1667386983`
console.log(moment(invoice.created).toDate()) // this is returning "1970-01-20T07:09:46.983Z"
#

oh wait nvm i'm a bit dumb. fixed the issue

#

forgot to *1000 ๐Ÿฅบ

mellow linden
#

๐Ÿ‘