#Jayy

1 messages ยท Page 1 of 1 (latest)

frank wrenBOT
late willow
#

here's a code screenshot

grave hatch
#

Hi! Could you please summarise the context?

late willow
#

Hi Vanya.
What i want to achieve is when a customer purchases an addon during their billing cycle, i wanna charge the full amount, calculate how much the prorated amount was, deduct it from the full amount and credit it to the user on his next invoice

#

I asked yesterday about what method can i use to do that as before here is how i charged the customer:

#

but that charged him the partial amount. not the full amount

grave hatch
#

Why would you deduct the prorated amount if the customer purchases an addon?
Wouldn't it increase the total amount?

late willow
#

so they asked if we can charge the full amount. then on credit them the days they haven't used on their billing cycle

#

so i'm struggling to find a not so complicated way to achieve that

grave hatch
#

I understand. You might need to add a custom Invoice Item to the upcoming Invoice. You will have to calculate the proration by yourself then.

late willow
#

could you clarify more about the custom invoice point please? i have no issue calculating the prorations ๐Ÿ™‚

grave hatch
late willow
#

alright thank you

grave hatch
#

Happy to help. Please, let me know if you have any other questions.

late willow
#

what api should i use for giving a customer credit on his next invoice?

#

the credit_notes ?

grave hatch
late willow
#

Alright thank you again for your help Vanya ๐Ÿ™‚ much appreciated!

grave hatch
#

Happy to help. Please, let me know if you have any other questions.