#OptimalSurprise-volume-pricing

1 messages · Page 1 of 1 (latest)

arctic ginkgo
#

Hey! What do you mean by 'usage stats'?

spare rampart
#

So I have a volume based object and I'd like to get the amount the invoice generated over the last billing period

arctic ginkgo
#

Do you have an Invoice ID? There's no concept of 'usage' with volume pricing, it's just determined by the quantity set in accordance with the tiers defined on the Price

spare rampart
#

I haven't implemented the feature yet

#

so no invoice id per se

#

but I'd just like to understand how much they used something in the last period

arctic ginkgo
spare rampart
#

ah so use quantity?

#

from the retrieved invoice

arctic ginkgo
#

Yes, the subsequent invoice would be itemised to reflect the usage throughout the period

spare rampart
#

in the lines data i have to use the quantity provided?

#

in the last generated invoice?

arctic ginkgo
#

That would reflect the most recent 'usage' for the billing period yep. However they may have upgraded/downgraded mid cycle so there could also be proration items for more/less quantity, depending on how you handle that

spare rampart
#

What do you mean downgraded in the last cycle? Would this affect the quantity?

arctic ginkgo
#

Actually, don't think that applies as the volume based stuff is invoiced at the end of the billing period

#

So if you started the cycle with 1 and updated to 2 at the end of the cycle, they'd be invoiced for 2 regardless

spare rampart
#

Right, I think I understand

#

so to get the quanity used in the last complete billing period we just need to get quantity?

arctic ginkgo
#

Yep exactly

#

Which would be on the invoice

spare rampart
#

ah ok interesting

#

yep that makes sense

#

another q which is unrelated

#

are we able to use send_invoices to our connect customers?

#

sorry the end user for our connect customers

#

so on behalf of them?

arctic ginkgo
spare rampart
#

ah ok

#

that's interesting

#

i'll give it a go and see if it works

#

i was told previously that it may not work

arctic ginkgo
#

Yeah I'm not sure tbh! Should be easy to test

spare rampart
#

yes true

#

i'll give it a go

#

thanks for your help on this

arctic ginkgo
#

np!