Jump to content

Prorata billing formulas


hushcat

Recommended Posts

I'm looking for a way to customise WHMCS to bill our products in the correct way. I've achieved part of this (all payments are due the 1st of the month) by enabling prorata billing and adding a hook to update the due date on invoices (needed for new orders, otherwise its due immediately). Payment is also due in advance, except for the first month, so I have next month included from the 1st.

 

Only challenge left is the prorata amount billed. For some services, the default WHMCS calculation is fine. For others, I need to bill the full month regardless (subscriber is getting the same benefit and cost is the same regardless of when in the month they sign up). For another group of products, I want to charge half price if it's after the 16th, otherwise full price.

 

For example, for product A, user signs up on the 7th at a price of $99 per month, he should be charged $178.20 on the 1st of the next month and $99 per month recurring. This part works.

 

For product B, user signs up on the 7th at a price of $99 per month, he should be charged $198 on the 1st of the next month and $99 per month recurring.

 

For product C, user signs up on the 20th at a price of $99 per month, he should be charged $148.50 on the 1st of the next month and $99 per month recurring. If he signed up on the 7th also, he should be charged $198.

 

Any ideas how this can be achieved?

Link to comment
Share on other sites

Heres what i use for my formula

 

Say a client pays on the 3rd of the month and you want to charge them on the 20th of the month.

 

Price/Days in month * # of days left

 

example:

$99 Monthly, theres 30 days in the month and the client paid on the 3rd of the month, heres what you do to calculate the pro rata amount.

 

99(Price) / 30(Month) = 3.3 = $3.3 A day for 30 days.

 

30 - (Day paid)

30-3=27

 

27 days are left in which after the client has until he/she hits the 30th day.

 

Below is if you just wanna calculate the prorata for the rest of the month

27 * $3.3= $89.1

 

If you want the 20th of every month from the 3rd in which the client paid then do

 

Days in month + Days in month

 

30Days+31Days= 61 Days = 2 month period

 

If the month has 31 days and want to get paid on the 20th, then subtract 20-31= 11

 

Then do 11+30=41 then the date paid will be subtracted.

41(total days to reach 20th of next month) - 3(day of month paid)= 38

So 38 days is what is technically left until the 20th of the month will be reached in which you will get the next payment from your client.

 

Total payment.

1st Month 89.10 (Pay for rest of month)

2nd Month 63.87 (Pay for next month)

Add both months for payment for first month and payment until 2

Total: $152.97

Add the 1st and 2nd and get the total for both months to be prorata billing, this will get you paid for the 20th.

 

Hope this helps, please let me know if you have any questions.

Edited by stuntnmore
Link to comment
Share on other sites

  • 5 years later...
On 4/10/2014 at 5:22 AM, stuntnmore said:

Heres what i use for my formula

 

Say a client pays on the 3rd of the month and you want to charge them on the 20th of the month.

 

Price/Days in month * # of days left

 

example:

$99 Monthly, theres 30 days in the month and the client paid on the 3rd of the month, heres what you do to calculate the pro rata amount.

 

99(Price) / 30(Month) = 3.3 = $3.3 A day for 30 days.

 

30 - (Day paid)

30-3=27

 

27 days are left in which after the client has until he/she hits the 30th day.

 

Below is if you just wanna calculate the prorata for the rest of the month

27 * $3.3= $89.1

 

If you want the 20th of every month from the 3rd in which the client paid then do

 

Days in month + Days in month

 

30Days+31Days= 61 Days = 2 month period

 

If the month has 31 days and want to get paid on the 20th, then subtract 20-31= 11

 

Then do 11+30=41 then the date paid will be subtracted.

41(total days to reach 20th of next month) - 3(day of month paid)= 38

So 38 days is what is technically left until the 20th of the month will be reached in which you will get the next payment from your client.

 

Total payment.

1st Month 89.10 (Pay for rest of month)

2nd Month 63.87 (Pay for next month)

Add both months for payment for first month and payment until 2

Total: $152.97

Add the 1st and 2nd and get the total for both months to be prorata billing, this will get you paid for the 20th.

 

Hope this helps, please let me know if you have any questions.

How does this work in WHMCS?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated