#Stealth

1 messages · Page 1 of 1 (latest)

tawny vaultBOT
supple shore
#

Hi there!

#

Can you clarify your question? What were you expecting to see on this subscription?

mental schooner
#

I was expecting that once threshold is reached invoice will be finalized and sent to the customer. But there is only pending invoice created.

#

So I have to manually trigger "invoice now" in order to send invoice.

#

This is the customer cus_MqxSlb909Pk6Go

supple shore
#

It looks like this subscription has $0 in metered usage for now, so the $50 threshold hasn't been reached yet.

mental schooner
#

Does meter reset when pending invoice is created?

#

When I update subscription threshold is reached. New pending invoice item is created. And that is okay. But it is not automatically finalized.

supple shore
#

Can you share the request ID where you increase the metered usage of this subscription?

mental schooner
#

evt_1M97BYGpJlO3RAQZfnkmArEh

tawny gorge
#

Hi there 👋 I'm jumping in to lend a hand, please bear with me a moment while I catch up on the context here.

mental schooner
#

Hmm. I tested this before and itwas not finalized. It is finalized within 1 hour when threshold is not used. I can wait 1h to see if that will happen but if I remember from my previous tests it did not happen.

tawny gorge
mental schooner
#

Thanks. I will look into it. in_1M96qQGpJlO3RAQZ15cZR29H this is invoice I had to manually finalize. Same scenario as this one. Changes where made on 23rd november and pending invoice was never automatically finalized

tawny gorge
mental schooner
#

Correct. I created invoice by click onto "Invoice now" button. It should have been invoiced automatically on 23rd nov when changes were actually made

tawny gorge
#

Between, you shared an event and an invoice of two different Subscription. I invite you to clean up your related test to this scenario and create a new one using test Clock and try to simulate it again by advancing the time

#

Also, the price you are using is an annual interval so the recorder items will remains pending until the end of the current period

mental schooner
#

Yes. I would like to invoice them immediately after the threshold has been reached. without resetting billing period.

#

Can I combine BillingThreshold and PendingInvoiceItemInterval?

tawny gorge
tawny gorge
mental schooner
#

I have annual subscriptions. Let's say user paid for 10 units. After a while user adds another 3 units. Those 3 new units would be charged at the new billing cycle (after 1 year). I would like to charge these additional 3 units immediately without waiting 1 year.

tawny gorge
mental schooner
#

I see. What about PendingInvoiceItemInterval? Would that work? Description "Specifies an interval for how often to bill for any pending invoice items."

#

It seems like this is exactly what I need. Bill pending invoice items.

vernal quarry
#

Hey. os4m37 had to step out but I am catching up here and can help out in a minute.

#

I think that param may be what you are looking for but I am not that familiar with how it works. If you already have a test clock test set up, can you try running your test again but with setting that interval to daily?

mental schooner
#

One moment. Does test clock advance freezes in time? Or it starts ticking from new time onwards? Like If advance time to 29th Nov at 14:22... Will it stay there forever or it will reach 14:23 after a minute, and so on.

#

Just figured it out. Freezes. I tested PendingInvoiceItemInterval and it does exactly what I need.

vernal quarry
#

Great to hear! Good job figuring those out

mental schooner
#

Thanks for the help.

vernal quarry
#

Of course, always happy to help