#nick-usage-record-invoice

1 messages · Page 1 of 1 (latest)

stoic ivy
#

@bleak fulcrum there's no reason it'd send an event since usage records apply to future invoices

bleak fulcrum
#

But updating the quantity of an item on an upcoming invoice does send an invoice.updated event from what I can tell

stoic ivy
#

Fairly certain that's not true

#

do you have a concrete example?

bleak fulcrum
#

Sorry, invoiceitem.updated, but still sends an event

#

So the reason that one fires an invoiceitem.updated event is because it's a one-off item on the invoice.

But also, if you change the quantity of the actual subscribed item, you still get an event, it's just in the form customer.subscription.updated

stoic ivy
#

invoiceitem.updated is completely different

#

it means you update an existing invoice item

stoic ivy
#

usage records are just "pending" until the day they get invoiced on the next billing cycle

#

so it's totally expected to have no events for those

bleak fulcrum
#

So there's no way at all to listen for one system creating a usage_record from another?

stoic ivy
#

correct there is not

bleak fulcrum
#

And it sounds like this is completely intentional, not just missing functionality? I'm just curious about the rationale since most other entities seems to send webhooks

#

Like is this a feature I can request maybe?

stoic ivy
#

correct, completely intentional!

#

usage records are often used to report individual records in real time. Sending events for every single one would overwhelm the vast majority of integrations

#

they are for future invoices and you shouldn't need real time reporting, or you could do this yourself

#

usually you're going to preview the upcoming invoice when you need to