#fran_api

1 messages ¡ Page 1 of 1 (latest)

royal gorgeBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1247904927230201947

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

tough lodge
#

Hello

keen night
#

Hi

tough lodge
#

Hmm sounds like you are doing things correctly here

#

Can you provide the Subscription ID that you tested with?

#

And explain a bit more about what is unexpected?

#

The way metered billing works is that it does track during the period

keen night
#

Yeah give me a sec cause i deleted doing test but i have another one

#

sub_1POJhfLPUpdyowFEnVReCF37

tough lodge
#

That Sub looks to be on trial currently

#

So any usage won't be attributed during that period

#

You would need to advance time past the trial period

#

And then record usage

keen night
#

Yeah but i want to persist during time

#

let me explain

#

A customer register a user this increase the meter, but this increased have to be permanent cause the user is on the system registered, the customer have to pay for the total number of user that he has registered on the system

#

I dont know if i can setup billing meter to work like that

tough lodge
#

Yeah you wouldn't use metered billing for that

#

You would just use a normal licensed Price for that

#

If you want to persist the same amount of users across every period then that is just a normal licensed model

keen night
#

And increase it amount every user registerd

#

?

tough lodge
#

Yes

keen night
#

But i can change the amount on mid period?

tough lodge
#

You would decide on whether to handle proration or not

#

Or to invoice immediately on an update

keen night
#

Okey

tough lodge
#

Hmm actually wait

#

This actually will be easier with metered billing

#

That will carry your usage across period boundaries

keen night
#

oh okey, so in the meter event i have to pass the max value always

tough lodge
#

Nope

keen night
#

But for example, I register 2 user it increase the meter and on the same period i decrease 1 user, i want to bill the max of the period, but if no change on the period the last

tough lodge
#

Oh I see

#

Yeah if you want to still bill for the max during that period then you would need to wait until the next period to decrease

#

If you are going to use aggregate_usage: 'last_ever'

#

The other option would be to record the starting usage at the beginning of every period (based on the ending usage of the previous period)

keen night
#

using webhook to track when the customer period is ending and setting the meter on that moment, no?

tough lodge
#

Yeah you would use a Webhook to know when the next period is starting and then you could go ahead and record usage for that next period with the amount that you want them to start with (if you want to go that route)

keen night
#

Okey

#

Ill try it there is any doc about how to advance the time to do the test?

tough lodge
keen night
#

Thanks so much for the information