#mathan-Invoice

1 messages ยท Page 1 of 1 (latest)

hearty elk
#

setting billing_cycle_anchor?

spark sinew
#

its the only way or is any other option in stripe settings?

hearty elk
#

You can also use Subscription Schedule. But it's a bit complicated API to use

spark sinew
#

Okay

#

In billing_cycle_anchor if I set Sep 01 when I create a subscription, from the next cycle it automatically creates invoice 1st date(Oct 01, Nov 01)?

hearty elk
#

Yes, using UTC time

spark sinew
#

Okay, any examples for my scenario?

reef jolt
#

what example are you looking for specifically?

spark sinew
#

**In billing_cycle_anchor if I set Sep 01 when I create a subscription, from the next cycle it automatically creates invoice 1st date(Oct 01, Nov 01)? ** for this scenario

#

what I put in billing_cycle_anchor?

reef jolt
#

put in the UTC timestamp like what orakaro mentioned

#

e.g. 1660799971 - this isn't Sep 01, just so you know

spark sinew
#

Okay, if I put Sep 01, then next month it will create an invoice on Oct 01 right without any changes from my side (automatically)?

reef jolt
spark sinew
#

Okay that's great, any steps explanation to using testclocks?

reef jolt
#

it's mentioned in the link i provided, maybe you'd want to go through it first?

spark sinew
#

Okay

#

For example, now I am in one plan with a price of 600$ and I changed to another plan in 15 days in this scenario** I need to bill only for that 15 days like 300$**, what do I do?

reef jolt
#

your subscription is billing up front for the full month first right?

#

example : on Oct 1, the customer will pay for the period of Oct 1 - Oct 31

spark sinew
#

No its usage based

#

customer will pay after using

reef jolt
spark sinew
#

I think it's not my question, For example, now am in one plan with 600$ monthly base price(usage-based) after 15 days i upgraded to another plan(updating subscription) and in this scenario i jus bill 15days bill like (600%30) * 2

reef jolt
#

do you have a Price which you've created for this $600 monthly base price (usage based) that i can take a look at?

#

i'm confused by what you mean by $600 monthly base price(usage-based)

spark sinew
reef jolt
#

as an example - something like this?

spark sinew
#

yes right

reef jolt
#

there's no easy way to do this with metered usage. Prorations aren't supported for metered usage. So what will happen is that it will charge the full base price + usage if you choose to invoice on the 15th day

#

the only way i can think of is for you to implement your own logic and perform the necessary calculations to create a invoice item to prorate for the period of days that is unused

spark sinew
#

Okay, the proration period did not work with metered billing??

reef jolt
#

yes - proration does not work with metered billing.

spark sinew
#

Okay, that base cannot change right?

#

in stripe

reef jolt
#

the base will not be prorated

spark sinew
#

any other ways to do this like other usage-based billing methods?

marble badge
#

๐Ÿ‘‹ I'm taking over this thread from alex, catching up now

#

When usage-based billing is used, the usage should be submitted to Stripe when the service is used ideally and customer will be charged for those usage for cancellation

#

Could you share the use case why proration is required for usage-based billing?

spark sinew
#

yes

#

In graduated billing, I set a base 200$ and a flat fee 20$ per quantity, In this scenario, for example In 30 days cycle customer just changed their plan after 15 days i just need to bill base amount of 100$ (depending upon date)

marble badge
#

Let me think if this is possible

spark sinew
#

Okay

marble badge
#

I don't have a clean way for you, but one possible way is to create two separated prices:

  • One price for flat fee $200
  • One price for usage based billing $20 per quantity

When creating a subscription, there will be two items. However, the flat fee will always be charged at the beginning of the cycle instead charging at end of cycle like usage based billing.

#

Alternatively, you can calculate the proration on your own and apply the unused amount in the form of discounts when updating/cancelling a subscription

long salmon
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

long salmon
#

two prices/plans but you can use them on the same subscription

spark sinew
#

but I need to charge a flat price at the end of the cycle!

long salmon
#

so you want to disregard the usage record for the month?

#

could you please elaborate more on your use case?

spark sinew
#

my use case:- for example I have one plan that has one** base price of 200$ + quantity price at the end of the cycle.** if the customer subscribed to this plan and after 15 days they changed to another plan so, in this case,** I just need to bill 15dys to cost only (for example (200%30) 2 = 100$). i am using usage-based billing*

long salmon
#

do you have a subscription id with this example?

fallow plinth
#

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