Jump to content

Billing automation date - how to auto charge payment on 1st of month?


Recommended Posts

In previous months I set up WHMCS and configured pretty much everything. I've been taking it real slow 'cause I want to understand what everything is and don't want to cause a 'train wreck' with my clients by getting to hasty with anything.


A couple months ago I had a client buy their SSL certificate (product) and everything went fine: the credit card charge went though and the SSL certificate was generated and delivered by the service provider. So I know at least some essential aspects of the system are functioning.



Last month, I created some hosting products, and yesterday I manually entered a handful of new accounts for a few customers, entered their payment details (for recurring payments), and did the "new order" routine to assign various recurring hosting products to their account. I did it this way to test that they will be automatically billed for hosting service.


However, it did not work (they were never billed) which is why I'm posting this.


I've been investigating this all day and I think I've found the problem but I'd like "a second opinion" on it:


When I created the hosting product, I didn't want them to pay a partial charge the last day of the previous month AND the full next month's charge (because these are existing customers who already paid in full for the previous month, March). So I left the "Prorata Billing" checkbox unchecked (off). I was hoping it would just bill the new invoice at midnight, or overnight.


I left "Prorata Date" and "Charge Next Month" to 0. I think this was the source of the error. In other places throughout WHMCS, there is a context note that says things like "leave at 0 to disable" or "set to -1 to disable". There was no such note next to the prorate and date fields, and as a programmer and sysadmin I'm used to arrays that are 0-9 instead of 1-10, so I assumed 0 was the first day of the month.


I'm now guessing that '0' is 'disable'.


So, first question: am I right about all that so far?


Next question: it's too late now for me to try setting prorata date to the 1st (right? or will it still process before midnight if I set it to the first now?). I'm wondering if I set the date to the 2nd, if they will process tonight?


However, if I do that, and even if it works, can I then (tomorrow or Wednesday, after it's run tonight) set the date back to the 1st and have it all automatically run through on the 1st of next month, or will it be stuck on the 2nd forever?



Link to comment
Share on other sites

I switched the date for the products in question to "1" (assuming now that 1 = the 1st). I set the cron job to run again. The email sent when it runs reports is (user names below obfuscated for privacy):


Credit Card Payments: 0 Captured, 0 Failed


4 Overdue Invoice Reminders Sent

- Sent First Notice to User *****

- Sent First Notice to User *****

- Sent First Notice to User *****

- Sent First Notice to User *****


So for some reason it's not trying to charge the credit cards on file. (it does actually send the overdue reminder email).


After reading other forum posts, I tried the link on the admin dashboard that says "Attempt CC Captures" and the response is similar:


Credit Card Payments Attempted

0 Captured, 0 Failed


I have checked the gateway setup and the automation settings several times. I've also poked around throughout the system to see if there's any other misconfiguration and cannot find anything that looks out of place. Perhaps I'm missing something.


Any specific suggestions regarding what the cause of this may be?

Link to comment
Share on other sites

As another test, I went to Billing > Invoices > Unpaid, navigated to an invoice for one of the users and clicked the "Attempt Capture" button, which did actually work. So at least that much is good.


What is not working (that I'd like to fix) is auto-processing for the remaining invoices that are due (or 'Overdue').

Link to comment
Share on other sites

Found the problem. I 'shot myself in the foot' with the Automation Setting "Retry Every Week For" ... "Enter the number of weeks to retry failed CC processing attempts for weekly" set to one. Upon re-reading the documentation, that's not "0=disable", that's "0=try every day instead of once per week".


Problem SOLVED, my mistake.

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.

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