#stripe101-price

1 messages · Page 1 of 1 (latest)

bold hollow
#

What is your integration using? Invoices? Checkout?

lyric tinsel
#

Invoices.

bold hollow
#

Gotcha - so there isn't really a great way to do this w/o storing some additional information. Without any changes, you'd have to list all the Invoice for that customer (https://stripe.com/docs/api/invoices/list#list_invoices-customer), iterate through all the invoices and check their line items to see if they have paid for a specific price

#

A better solution would be for you to store this information in your own databases (or maybe in the Customer's metadata) so you can get this information more easily

lyric tinsel
#

Even then though it seems I'd have to iterate over line-items since to know for sure if a Price was paid for we'd have to listen to the webhook for it. Is that right?

ocean reef
#

I think so, but not exactly clear on what you mean. You talking about looking backward i though, so you'd be inspecting paid invoices.

#

If you mean tracking this going forward then sure you could set up something to receive eg invoice.paid webhooks