#yoshi-fim-subscriptions

1 messages · Page 1 of 1 (latest)

granite wolf
#

hi there! For metered billing, when the invoice is created, it would automatically charge based on the already recorded usage. Is there a reason why you want to create the usage record after the invoice has already been created?

sand gazelle
#

@granite wolf Because of the real-time fluctuating nature of the metered base amount, we want to ensure that the correct value is entered after the Invoice is created.

We have a system that generates billing based on the value of the number of visits to the site, and we wanted to have a system that records the final value from our server after the Invoice is issued.
We are wondering if it is not a good idea to implement this in a way that every time there is an increase in the number of visits during the billing period, it is recorded on the Stripe server.

If there is a better way to do this, please let me know.

granite wolf
#

it's preferable that you record the usage (i.e. visit to the site) each time on Stripe. Stripe will then automatically do all the necessary calculations on your behalf when the invoice is created.

Let me do some testing to see if it's possible to do it the way you want though.

sand gazelle
granite wolf
#

i wouldn't worry about the load on Stripe's server, Stripe is built to be able to handle these loads. I think my recommendation to you remains the same i.e. log the visits as they happen to Stripe

sand gazelle
#

Okay, we will consider that implementation method as an option.

I do have one more question for you.
Is it possible to use a pay-as-you-go Price when creating an InvoiceItem? Or is there a similar method?
If we implement it in the way you suggested, we would be concerned about the load on our server, so we would like to consider issuing Invoice each time instead of Subscription as another option.
In that case
(1) Specify the 'quantity' at the time of InvoiceItem.create.
(2) The invoice amount is determined according to that value.
If you can do this, it would be very helpful because it would make price calculation much easier.

granite wolf
#

ah, yep your idea of issuing a standalone invoice, instead of using Subscriptions would probably work too

#

unfortunately, as far as i can tell, there's no way to set/update the usage of an already created invoice for the Subscription