Recurring payments are automatic deductions of funds, which occur at set intervals. They do not require re-entering of bank card or e-wallet details. In BILLmanager, recurring payments are used to automatic replenishment a personal account (auto payment) and to create subscriptions. For more information about subscription settings, see Subscriptions.
In the case of using recurring payments for auto-replenishment of a personal account, the user once sets up automatic replenishment of the account and then his balance is replenished automatically as necessary.
Funds are added to the BILLmanager account automatically when the client has insufficient funds to pay for services with automatic renewal or daily billing cycle. The amount of every recurring payment is generated based on estimated expenses for the next month.
Example: a client orders the Shared hosting service for 150 euro per month and activates the automatic renewal option. The client uses recurring payments. After he had paid for the service, he had 10 euro left on his account.
So the estimated expenses for the next month is 140 euro. The system will make a recurring payment for 140 euro. On the third month, the system will pay the full price — 150 euro.
If the automatic payment failed, the client will receive the error notification "Cannot complete automatic payment".
Configuration
Admin area
Some payment methods support recurring payments:
To enable recurring payments, navigate to Provider → Payment methods → Edit → check the Recurring payments box:
This checkbox is also available on a new payment method creation form Provider → Payment method → Add → Recurring payments.
With this option enabled, the system will add new configuration fields specific to each payment method. For more information, refer to a certain payment method page.
Client area
Recurring payment management options can be found in Billing → Auto payment. This menu section is hidden if the service provider has not configured the payment method supporting automatic invoicing. On the configuration form, a client can choose the desired payment method and enter the maximum payment amount. To create an auto-payment without the limit, leave the Maximum payment amount field blank.
When the client has insufficient funds in his account for the automatic payment, BILLmanager will send to his email the notification that the monthly auto-payment limit has been reached". The notification is sent only after the first failed attempt to make the automatic payment.
Eg., the total amount of auto-payments for the current month is 90 euro and the limit is 100 euro. Today is the day when the system will charge the account automatically for 20 euro. The upcoming autopayment amount will be 110 euro. This amount exceeds the specified limit, so BILLmanager will cancel the payment and email the notification to the client.
Clicking Confirm will redirect the client into the payment system to allow for automatic payments to the provider's company.
How payment is created
The payment will be created provided that the client has insufficient funds on his account balance for renewing services with the enabled auto-renewal option and daily charges. The payment process starts right after creation.
A task to send notifications and top up the balance (if auto-payment is set):
BILLmanager low money notification
0 1 * * * /usr/local/mgr5/sbin/billmaintain --command warnmoney >/dev/null 2>&1
A task to prolong services through saved payment methods or from the balance of personal account:
BILLmanager daily billing
15 0 * * * /usr/local/mgr5/sbin/billmaintain --command billdaily >/dev/null 2>&1
If the system failed to make a payment
Check logs
If an error occurred during the payment process on the payment gateway side, the payment status in BILLmanager will be "New". The log file /usr/local/mgr5/var/logs/billmgr.log will contain the following information:
core_module INFO Request [pm<payment_system>][root] 'func=payment.recurring.payerror&out=xml&payment=<payment_id>'
To get information about an issue, open the log file of the corresponding payment system.
Invalid_token
If the payment system sends the response invalid_token, BILLmanager will use an expired or invalid authorization token. In this case, the log file of the payment system contains the following string:
libmgr ERROR Error: Type: '<payment_system>_error' Object: 'expired' Value: 'invalid_token'
To resolve the issue, set up a new auto-payment in the customer's client area:
- Go to Finances → Auto-payment.
- Disable the old auto-payment.
- Configure a new one.