#meteograms-customer-purchase
1 messages · Page 1 of 1 (latest)
Hello, looking in to this
Can you tell me a bit more about what your payment flow is like now?
Are you using Checkout with prices? PaymentIntents?
I'm using Checkout with prices.
So I can listen to the checkout.session.completed webhook (I do already) and keep my own records, but if I need to perform a separate lookup in the future, to check what products/prices the customer has purchased in the past, it would be useful to know what the appropriate API call is, and what information I'm looking for. Does the customer object contain this info? It has current subscription information... just not sure about other types of purchases.
@scenic hare a Customer represents the "entity" paying for your service. We don't store on the customer "what they bought over the years". That information lives elsewhere, either in Stripe (if you use Checkout for example) or in your own database otherwise.
My recommendation is to track this yourself in your database really, but with Checkout you can use the List Sessions API https://stripe.com/docs/api/checkout/sessions/list and filter with customer: 'cus_123' to find all the sessions from that customer and look at each session's line items to see what they bought to do some analysis
OK I'll check that out, thanks!