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?
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?