Jump to content

How to pro-rate an order for one product, but not the others


mpierre

Recommended Posts

Hi,

 

We have 1 product we offer which we bill monthly and for which we want the client to have the same day of the month for them. If their first product is ordered on the 15th, and their second is ordered on the 10th of the next month, the client would only pay for 5 days and he would be billed on it on the 15th of every month.

 

Prorata is turned off in the settings, and both orders will come thru the API.

 

This is how we place the orders right now:

 

$postfields["action"] = "addorder";

$postfields["clientid"] = $customer;

$postfields["pid"] = "62";

$postfields["domain"] = "";

$postfields["billingcycle"] = "monthly";

$postfields["paymentmethod"] = "[our gateway]";

$postfields["responsetype"] = "xml";

$postfields["clientip"] = $_SERVER['REMOTE_ADDR'];

$whm = MakeWhmcsApiRequest($postfields);

 

 

The only ways I can see to achieve out goal is to do one of these:

 

Method A ) Manual invoice:

 

1 ) set noinvoice to TRUE on the order

2 ) once the order is placed, we manually create the invoice, but we do not link it to the package

3 ) We modify the package to expire on the 15th, so that it will be invoices on that date, and hopefully, on the following months, it will keep the 15th and not the 10th as the billing date.

 

Method B) Price override

 

1 ) Set a priceoverride to the prorated rate, so that the invoice says the right amount, sadly, it will not have the right expiration date

2 ) Once the invoice is paid, modify the package to expire on the 15th, so that it will be invoices on that date, and hopefully, on the following months, it will keep the 15th and not the 10th as the billing date.

 

I don't really like B because the first invoice isn't as clear.

 

Is there another solution? Is there a way to modify the call to addorder so that I can specify it's not for a full month with an actual rate and expiration date?

Link to comment
Share on other sites

But if we use prorated billing, than all clients will be charged on the same date?

 

If a client orders his first package on the 17th, I would want him to always be billed on the 17th, even on future orders.

 

If another client signs up on the 13th, I would want him to always be billed on the 13th, even on future orders.

 

Do I just keep the "Enter the day of the month you want to charge on" value to 0? Do I create 30 different products each with a different day of the month so that a client will always order the same package?

 

At worst, I can change our procedure and bill everyone on the 1st of the Month, that's what my sales crew wants anyway, but it makes the first month hard to calculate in advance.

Link to comment
Share on other sites

It worked, except for one tiny thing: I have setup the billing on the 1st of the month with the cost of the second month on the 15th.

 

we have an add-on, which is NOT pro-rated, and when we place an order after the 15th, it only bills one month of the add-on, not 2...

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