#edutomesco

1 messages ยท Page 1 of 1 (latest)

dull violetBOT
analog flower
#

๐Ÿ‘‹ happy to help

green basin
#

and I pass the exactly timestamp that another record

#

it will override?

analog flower
#

I'm not sure, but I don't think so

green basin
#

or I should pass the action set too? Because I have subscriptions with billing threshold and the documentation says that I can't use the action Set with subscriptions with billing threshold

green basin
analog flower
#

that's interesting, let me dig into this for a sec

green basin
#

thanks

analog flower
#

still looking into this, I'm afraid this might not be possible, but I'm trying to see if there is any workaround

#

the only workaround I could find is basically keeping track of the actual usage record on your own and just updating with the delta whenever it is positive

#

e.g. you updated the usage record for 10 but actually it should only be 5, next time if you need to update the usage record for 10 you would add a 10 - 5 update

#

I know this must be frustrating, but let me try to explain the reasoning behind this. Let's consider that you have a subscription with a billing_threshold set to 10

#

in that case if you added a usage record of 15 this means that we will generate a new invoice for the first 10

#

but instead you find out that the usage record should have been 5, if we let you override the value what should we do about that invoice that was generated and paid? this is confusing especially for the customer

green basin
#

understand

#

thank you

analog flower
#

let me know if you need any more help

#

I guess what you can do is create a Customer Credit Balance with the difference if you want your customer to be entitled a "refund" in a sense if you don't want to use "deltas" and keep incrementing instead

green basin
#

All these is for a control of GB stored on a hosting, so I need to be consistent

#

what you mean with deltas?

analog flower
#

I mean if you added 50 more than you should have the next time you would add the delta meaning the new usage record - 50

green basin
#

so If I have a record usage of 50

#

and then I want to register a 50 I should add 0

#

or If I have 50

analog flower
green basin
#

and I want to add 30, I would add -20

analog flower
#

that's not possible

green basin
#

so then?

analog flower
#

instead what you should do is keep the "remaining delta" as 20 in your system and the next time it would be 50 - 20 = 30 and then you just add the 30

green basin
#

So I just add the usage when?

analog flower
#

the next time you need to increment

green basin
#

I mean if I add the 30 then the next time I want to modify I would have the same problem

green basin
#

Imagine I finally need to arrive to 0

#

Once I registered the 30 I can't modify that

analog flower
#

that's why I suggested Customer Credit Balance

green basin
analog flower
#

because let's say the Invoice now has 30 qty and you need 0 then by adding Customer Credit Balance it would apply a negative amount to the next invoice and it would look something like (let's say the price is 1$/qty)

Credit Balance         -30$
Price (1$ Qty 30)       30$
Total                    0$
green basin
#

there is no other option I think no?

#

XD

#

Because it's extremely hardcoded

#

You have any example of solution of anybody who controls the storage usage of a hosting or something like this

analog flower
#

you can technically create a refund but it would be a lot harder

analog flower
green basin
#

I'm using the billing theshold just on annual plans in order to trigger an invoice when a the overage is overpassed to not have to set annually values for the overage

#

you know if maybe there is a bettter way to manage that

#

Having overage on prices in a annually subscription, but I want to manage monthly the overage consumption

analog flower
#

there is no easy way to do that other than creating two separate subscriptions, or creating the overage invoices manually I guess

green basin
#

Okey thanks

green basin
#

sorry

hallow violet
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

green basin
#

I was thinking I can registered all values on stripe and then just take the most recent usage

hallow violet