Hello,
I want to be able to generate renewal invoices for services anytime I want. So I am using GenInvoices API to send a generate invoice request every time I need to renew service. But I am facing two issues.
1. The GenInvoices will not generate any invoices unless it's within the number of days set in the Invoice Generation setting in the automation tab. Does it have to be that way?
2. The GenInvoices will generate an renew invoices to all services within the due period, although I am specifying a service ID that I want to generate the invoice for.
curl_setopt($ch, CURLOPT_POSTFIELDS,
http_build_query(
array(
'action' => 'GenInvoices',
'serviceids' => '204',
// See https://developers.whmcs.com/api/authentication
'username' => '9pTW8lfy9RYGZWiby2fAJktSBjb96Tvn',
'password' => 'cGN3dGyA1rpv38np9NBClJ2N60y7MNEJ',
'responsetype' => 'json',
)
)
);
Any help is very well appreciated.
Thanks in advance.