#dan-burke - product charges
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Charges and Payment Intents are not aware of particular products (as in they don't use Price IDs). Did you mean Invoices or Checkout Sessions?
dan-burke - product charges
what I actually want is the record of all of the purchases of a given product and for what $ amount. what's the best way to get that?
it really depends how your integration in built in the first place. What exact product/APIs are you using?
i'm using Stripe Connect to power our contractor payments platform. Our customers (companies paying their contractors) are Stripe Customers and the contractors they're paying are Express Accounts
I want to be able to show a company a record of their payments to their contractors
unfortunately, this is still really vague
How do you accept payments? Are you using Checkout? PaymentLinks? Invoices?
Or just creating PaymentIntents or Charges yourself?
ah, we use Checkout Sessions
Perfect. So when you look at a Session, it will have the list of Products/Prices bought in the line items: https://stripe.com/docs/expand#includable-properties
so that's where you'd look
any plans to make a search endpoint for sessions? ๐
no plan to do that for now no
there's no way for me to add metadata to charges or payment intents that would help me here if i'm using checkout sessions, correct?
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata exists and works. But it's unlikely to be what you want. Really use the List Sessions API https://stripe.com/docs/api/checkout/sessions/list and ingest all that information in your own database, way simpler
why aren't you a fan of that? seems like exactly what I want
because what do you do if you Session has 100 items? What when you enable product cross-sells, quantity changes, etc. There are many things that can change what's in a Session over time.
Really what you want is to track what was paid for, which I would entirely do in my own database myself if it were me
gotcha, thanks for your perspective and help! you can close this