#vitalij-subscription-metered

1 messages ยท Page 1 of 1 (latest)

sharp ravenBOT
bronze pivot
#

Hello ๐Ÿ‘‹

#

Can you share the subscription ID?

neat vessel
#

Hi, it's sub_1MyG6bBYoO2umW8MTeROZWVs

#

What we are trying to do is have a subscription which have bother metered usage and unit based product in one subscription and pay invoices in arrears both for metered usage and unit based usage.

bronze pivot
#

Gotcha. Still looking to see if there's a way..

tepid mango
#

๐Ÿ‘‹

#

Can you clarify what the first invoice would look like ideally?

#

Like you want to defer the first invoice to the end of the initial billing cycle and then charge for both metered usage and a per-unit cost for that previous billing period?

neat vessel
#

Yea exactly that so if the first billing period is June 1 - June 14, we would like to take automatic payment on June 14 th for both metered usage and per-unit cost at that point.

tepid mango
#

At what point will you know the per-unit amount? Like you know that up front (which is why you don't want to use a usage-based concept for that too)?

#

Mostly there is no way to defer the initial invoice of $0. What you want to do is just update the Sub to add the per-unit Price to your Sub after it is created and set proration_behavior: none when you do this so that there aren't proration charges generated. Then going forward the Sub will cycle with both the metered and per-unit Prices.

sharp ravenBOT
neat vessel
#

We do know the usage upfront, as this is per day usage

tepid mango
#

Yep makes sense, but you don't want to charge that on Subscription creation, correct?

neat vessel
#

yes, correct

#

We want for all charges to go at the same time (end of billing cycle)

mint zealot
#

vitalij-subscription-metered

#

what's the problem with the first Invoice though? It's $0 and you can hide it

neat vessel
#

True we could filter it out, I just wonder if I missing a config where we can control at what point do we invoice for various products

mint zealot
#

no that's not possible, we always create an Invoice upfront

neat vessel
#

Gotcha, we will just filter it out.