#aubreywodonga
1 messages · Page 1 of 1 (latest)
hi! hmm, I don't think there's anything exactly like that. Off the top of my head what is probably easiest is to get that information from Invoices, by using https://stripe.com/docs/api/invoices/list#list_invoices-subscription and then filtering the items on the invoice to get the amount for the usage-based Price
as for getting the actual usage amount reported, I think that's the quantity on InvoiceLineItem
Ah nice idea! That sounds like it could work so I will have a go at that now. The usage is fine since that's something we track separately, I'm mainly looking to get accurate timestamps for beginning and ending subscription periods.
Thanks for your help!
ah, well that will be on the Invoice yes
i.e https://stripe.com/docs/api/invoices/object?lang=node#invoice_object-period_end and period_start
if it's a usage-based subscription then those are the dates of the preceding month(or other billing period) before the invoice was created
Yeah I think this should work perfectly. Thanks!