#dhruvTech

1 messages · Page 1 of 1 (latest)

leaden tulipBOT
raven crown
#

Hey I have per unit monthly subscription where I need to charge for number of unit used.

bronze furnace
#

Hi, what is your specific issue?

raven crown
#

I need to charge for customer how much the customer uses the subscription. I am trying to achieve it using metered based biling

#

However I need to report the usage as well

bronze furnace
#

Yep that's correct

raven crown
#

In week 1 the total reported usage is 20 Seats

In week 2 the reported usage decreased to 10 seats. How can I update the seats count.

#

If tried sending 20 and then 10 however it adds up 20 + 10 = 30 and charges for 30 seats

#

However the same seats count decreased to 10

bronze furnace
#

If you use set it will override, not increase

raven crown
#

However to set it I need the timestamp.Could you please help how can I get it?

bronze furnace
#

timestamp is optional, isn't it?

raven crown
#

I tried it however it will create new record even if I use set parameter

#

For overriding I guess we need that specific timestamp

#

Are you there?

bronze furnace
#

Yes

#

One moment

#

Sorry, that set action would override the usage at that exact timestamp, as you observed, and it's used as a "fix"

#

last_during_period instead of sum

raven crown
#

No other way to achieve this scenario?

bronze furnace
#

Why another way? Doesn't that work for you?

raven crown
#

Let me explain by an example

#

On 1st march quantity = 2
On 2nd march quantity = 1
On 3rd march quantity = No change
On 4th march quantity = No change
On 5th march quantity = 3
................................
and this overall quantity remain stable till 10th March.
On 11th March overall quantity reduced by 1.
So Now I want the removed quantity(user) should be charged from 1st March to 10 March and remaining will be charged for whole month.

bronze furnace
#

Um that's something our API doesn't support at this time. The Usage API is meant for allowing report anything within the period, but will calculate based on the final number in end of period. It looks like you want a proration on usage

#

I guess you would need to save the information (the removed one was removed on which day) within your system, then in next Invoice, you calculate the amount you want to charge (ie. 1 unit x 10days/30days) and adjust the Invoice, using an Invoice Item