#diesel_price-reconciliation
1 messages ยท Page 1 of 1 (latest)
๐ 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/1300504090257653760
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
More accurately, I need all transactions on that product, their price, and the name of the customer.
diesel_price-reconciliation
@fresh crest the easiest would be to use Sigma since all the data is in there with Checkout Sessions and their line items and you can look up all the Price(s) in those Session(s) and map them to their Product id
It's asking for money to pay for an AI. Is there a non-ai option?
Sigma is a paid product (unrelated to the AI) but it's also going to make you do that report in minutes instead of spending 2 days writing the code for it
Once I've been pointed to the right objects I can write reports in minutes. We're a volunteer organization and our money goes to rent. It's frustrating but that's what we have.
sounds good! Then use the List Checkout Sessions API and the Expand feature (see https://stripe.com/docs/expand and https://www.youtube.com/watch?v=m8Vj_CEWyQc) to understand how it works.
You can pass expand: ['data.line_items'] to get all the line items in that Session and for each one it will have the Price object which has product: 'prod_123' and you can loop over all Sessions to figure out which ones used Price(s) from specific Product(s)
what part of what I explained above is unclear?
Is there a way to expand the price name in a line item?
no there isn't. Best approach is to cache this information in your own database
Report complete. Thanks. Not sure who would take 2 days to write this.
It's just slow because I loop over all checkout sessions.