#Jayy
1 messages ยท Page 1 of 1 (latest)
stripe.invoices.retrieve(req.query.id as string, {
expand: ['lines.data.price.product']
})
Should do it
i'm trying to find the docs on expanding the data. could you send me a link for it too here please?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thank you ynnoj! appreciate the prompt help
ummm 1 more question. Does the test mode put a really old date on invoices and everything else ?
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?
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 ๐ฅบ
๐