Difference between revisions of "GoCardless"

From WHMCS Documentation

(Importing Existing Mandates)
 
(23 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 +
== About this Module ==
 +
 +
<div class="docs-alert-success">
 +
We added this payment gateway in WHMCS 7.7.
 +
</div>
 +
 +
[https://gocardless.com GoCardless] is a payment gateway which allows for direct debit payments to be automated electronically.
 +
 +
<div class="docs-alert-info">
 +
<span class="title">Important</span><br />
 +
Due to GoCardless API restrictions, you must contact GoCardless support to enable the feature.
 +
</div>
 
{{gateways
 
{{gateways
 
| onetime = yes
 
| onetime = yes
Line 4: Line 16:
 
| reversals = yes
 
| reversals = yes
 
}}
 
}}
 +
== Adding the GoCardless Payment Gateway ==
  
<div class="docs-alert-info"><i class="fa fa-info-circle"></i> This page describes a payment gateway available in WHMCS version 7.7 and above.</div>
+
To set up the GoCardless payment gateway in WHMCS:
 +
 +
# Go to the appropriate location for your version of WHMCS:
 +
#* For WHMCS 8.0 and later, go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > Apps & Integrations''' or '''Addons > [[Apps and Integrations|Apps & Integrations]]'''.
 +
#* For WHMCS 7.10 and earlier, go to '''Setup > Products/Services > [[Payment Gateways]]''' and choose '''All Payment Gateways'''.
 +
# Click '''GoCardless'''. A GoCardless login page will appear.
 +
# Either sign up for a new account or log in to your existing account. The system will automatically configure GoCardless for you.
 +
# Optionally, enter a custom name for the gateway for each of your supported currencies.
 +
# Check '''Show on Order Form''' to display this payment method in the Client Area during checkout.
 +
#In WHMCS 8.0 and later, enabling '''Charge Date Preference''' will allow the automation system to omit passing a <tt>charge_date</tt> value to GoCardless when the automation system triggers a payment attempt. This results in GoCardless starting the transaction as soon as possible.
 +
# Click '''Save Changes'''.
  
[https://gocardless.com GoCardless] is a payment gateway which allows for direct debit payments to be automated electronically.
+
===Charge Date Preference===
  
==Getting Started==
+
'''Charge Date Preference''' will determine if WHMCS passes a transaction charge date to GoCardless advising when to initiate the payment.
To activate the GoCardless module in WHMCS, navigate to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > Payment Gateways''' or, prior to WHMCS 8.0, '''Setup > Payments > Payment Gateways'''. Then, choose GoCardless from the All Payment Gateways tab.
 
  
Upon clicking, you will be redirected to link you account to WHMCS GoCardless App. On the page displayed, it is possible to sign-up for a new account or sign-in to an existing account. Once signed up, you will be redirected back to your WHMCS installation where you can customise the display name of the module.
+
* Disabling the option will pass through either the '''Next Due Date''' from the service or the <tt>next_possible_charge_date</tt> that GoCardless sets using the <tt>charge_date</tt> function depending on which date is later.
  
====Automatic Configuration====
+
* If you enable the option, the system will not pass a <tt>charge_date</tt> value to GoCardless and this will result in GoCardless beginning the payment process as soon as possible.
 In both scenarios, the payment attempt call to GoCardless will not occur until an invoice meets the invoice and payment capture attempt criteria that you set at '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Automation Settings]]'''.
There is no manual configuration required for the GoCardless Payment Module. All configuration fields will be filled automatically when redirected back to the WHMCS installation.
 
  
[[File:Gocardless-config.png]]
+
To process the payment prior to the '''Next Due Date''' date and according to the '''Process Days Before Due''' date at '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Automation Settings]]''', enable this setting. If you do not, the system may attempt the payment on or after the '''Next Due Date''' date.
  
For each supported currency and scheme enabled a custom name can be defined that will be displayed to clients wherever the available payment gateways are listed. This allows for naming that provides a more friendly and recognisable name based on the customers location, for example "Direct Debit" for UK/GBP customers, "ACH" for US/USD customers, etc...
+
=== Supported Currencies ===
  
===Supported Currencies===
+
GoCardless only support the following currencies:  
GoCardless only support the following currencies: 'AUD', 'CAD', 'DKK',  'EUR',  'GBP', 'NZD', 'SEK', and 'USD'. Any clients not using one of these currencies will be unable to make a payment using GoCardless and will receive an appropriate message.
 
  
<div class="docs-alert-info"><i class="fa fa-info-circle"></i> Support for USD was added in WHMCS 7.9.</div>
+
* AUD
 +
* CAD
 +
* DKK
 +
* EUR
 +
* GBP
 +
* NZD
 +
* SEK
 +
* USD <div class="docs-alert-info">We added support for USD in WHMCS 7.9.</div>
  
===SSL Requirement===
+
Clients who do not use one of these currencies cannot make payments using GoCardless.
  
GoCardless requires an HTTPS secured connection for the WHMCS installation that customers will be returned to following setup of a mandate. If the domain your WHMCS installation is installed on does not have a valid SSL Certificate, the payment return will not work.
+
=== Test Mode ===  
  
If you need to purchase an SSL Certificate, you can do so at [https://www.whmcs.com/ssl-certificates www.whmcs.com/ssl-certificates]
+
You can use test mode to simulate payment processing without actually causing a transaction to occur. This can be useful to test your configuration.
  
 
==Payment Workflow==
 
==Payment Workflow==
When the first payment is made, a mandate is set up with the client's bank. This typically takes a few days, so the invoice will change from '''Unpaid''' to '''Payment Pending''' status.
 
At this point you can view the mandate details and expected payment completion date by viewing the invoice. As soon as the mandate is set up and the first payment has cleared, the invoice's status will change to '''Paid''' and the service will be provisioned by WHMCS automatically.
 
  
When the renewal invoice is generated for a recurring service, a capture attempt will be made against the mandate in accordance with '''Process Days Before Due''' in '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > Automation Settings''' or, prior to WHMCS 8.0, '''Setup > Automation Settings'''. As it can take a few days for the payment to complete, we recommend a setting of '''3'''. This way, 3 days before the invoice '''Due Date''', the payment process will be initiated by the cron and the invoice status updated from '''Unpaid''' to '''Payment Pending'''. Payment should then complete on the invoice '''Due Date''' and the invoice will be marked '''Paid''' once the payment has cleared.
+
When the first payment is made, a mandate is set up with the client's bank. This typically takes a few days, so the invoice will change from '''Unpaid''' to '''Payment Pending''' status. At this point, you can view the mandate details and expected payment completion date by viewing the invoice. As soon as the mandate is set up and the first payment has cleared, the invoice's status will change to '''Paid''' and the service will be provisioned by WHMCS automatically.
  
Once a mandate has been created, WHMCS can use it for processing renewal payments for any other services associated with the client as long as they are set to the GoCardless gateway as well.
+
When the renewal invoice is generated for a recurring service, a capture attempt will be made against the mandate in accordance with '''Process Days Before Due''' in '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Automation Settings]]''' or, prior to WHMCS 8.0, '''Setup > Automation Settings'''. As it can take a few days for the payment to complete, we recommend a setting of '''3'''. This way, 3 days before the invoice '''Due Date''', the payment process will be initiated by the cron and the invoice status updated from '''Unpaid''' to '''Payment Pending'''. Payment should then complete on the invoice '''Due Date''' and the invoice will be marked '''Paid''' once the payment has cleared.
  
When making a manual payment, customers are able to select to use a previously stored bank account or enter a new one.
+
After you create a mandate, WHMCS can process renewal payments for any other services associated with the client, as long as they also use the GoCardless gateway.
  
Please note that customers never leave your WHMCS installation during checkout or adding/removing a new bank account. Personal bank information is submitted directly to GoCardless and is never stored in your local WHMCS installation.
+
The system redirects clients to GoCardless to enter their bank details when setting up a mandate. Then, GoCardless returns them to WHMCS after the setup is complete. The system submits personal bank information directly to GoCardless and never stores it in your local WHMCS installation.
 
 
==Charge Date Preference==
 
<div class="docs-alert-warning"><i class="fa fa-info-circle"></i> This section describes a feature available in WHMCS version 8.0 and above.</div>
 
By default, payment capture attempts will set the GoCardless Charge Date to the due date for an invoice. Enabling this setting on the GoCardless module will instead initiate the payment capture immediately upon invoice generation.
 
 
 
To do, navigate to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > Payment Gateways''' or, prior to WHMCS 8.0, '''Setup > Payments > Payment Gateways'''. Click the '''Manage Existing Gateways''' tab. Tick the "Charge Date Preference" box and save changes.
 
  
 
==Reversed Payments==
 
==Reversed Payments==
Line 62: Line 81:
 
Please refer to the [https://support.gocardless.com/hc/en-ca/articles/210536269-Refunding-payments refunding payments] section of the GoCardless documentation.
 
Please refer to the [https://support.gocardless.com/hc/en-ca/articles/210536269-Refunding-payments refunding payments] section of the GoCardless documentation.
  
==Reinstate Mandate==
+
== Mandates ==
<div class="docs-alert-warning"><i class="fa fa-info-circle"></i> This section describes a feature available in WHMCS version 7.8 and above.</div>
+
 
 +
<div class="docs-alert-success">
 +
We added these features in WHMCS 7.8.
 +
</div>
 +
 
 +
=== Reinstating Mandates ===
 +
 
 +
<div class="docs-alert-warning">
 +
Reinstating mandates requires specific permission from GoCardless.
 +
</div>
 +
 
 +
When a mandate has been accidentally cancelled, WHMCS can initiate steps to reinstate the mandate without having the client set it up again.
 +
 
 +
To do this:
 +
 
 +
# Go to the appropriate location for your version of WHMCS:
 +
#* For WHMCS 8.6 and later, go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Payment Gateways]]'''.
 +
#* For WHMCS 8.0 and later, go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Payment Gateways]]''' and choose '''Manage Existing Gateways'''.
 +
#* For WHMCS 7.10 and earlier, go to '''Setup > Products/Services > [[Payment Gateways]]''' and choose '''Manage Existing Gateways'''.
 +
# Click '''Manage Cancelled Mandates'''.
 +
# Follow the instructions in the modal that appears to reinstate a cancelled mandate.
 +
 
 +
=== Importing Existing Mandates ===
 +
 
 
<div class="docs-alert-info">
 
<div class="docs-alert-info">
<span class="title">Permission Required:</span><br />
+
You must disable any automatically-charged mandates that you import in order to prevent possible duplicate charges.
Reinstating Mandates requires specific permission from GoCardless
 
 
</div>
 
</div>
When a mandate has been accidentally cancelled, WHMCS can initiate steps to reinstate the mandate without having the client set it up again.
 
Navigate to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > Payment Gateways''' or, prior to WHMCS 8.0, '''Setup >  Payments > Payment Gateways'''. Click the '''Manage Existing Gateways''' tab. Click on the '''Manage Cancelled Mandates''' button and follow the instructions in the modal that appears to reinstate a cancelled mandate.
 
  
==Import Existing Mandates==
+
You can import mandates that you set up outside of WHMCS and associate them with a client.
<div class="docs-alert-warning"><i class="fa fa-info-circle"></i> This section describes a feature available in WHMCS version 7.8 and above.</div>
+
 
<div class="docs-alert-info"><i class="fa fa-info-circle"></i> If any of the mandates being imported are set to be automatically charged by GoCardless, that will need to be disabled to prevent possible duplicate charges.</div>
+
To do this:
For mandates that have been setup outside of WHMCS, they can be imported and associated with a client.
+
 
Navigate to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > Payment Gateways''' or, prior to WHMCS 8.0, '''Setup >  Payments > Payment Gateways'''. Click the '''Manage Existing Gateways''' tab.
+
# Go to the appropriate location for your version of WHMCS:
Click on the '''Import Existing Mandates''' button and follow the instructions in the modal that appears to import a active mandate to a specific client.
+
#* For WHMCS 8.6 and later, go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Payment Gateways]]'''.
 +
#* For WHMCS 8.0 and later, go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Payment Gateways]]''' and choose '''Manage Existing Gateways'''.
 +
#* For WHMCS 7.10 and earlier, go to '''Setup > Products/Services > [[Payment Gateways]]''' and choose '''Manage Existing Gateways'''.
 +
# Click '''Import Existing Mandates'''.
 +
# Follow the instructions in the modal that appears to import a active mandate to a specific client.
 +
 
 +
=== Removing Mandates ===
 +
 +
You can remove mandates by deleting the client's GoCardless [[Pay_Methods|pay method]].
 +
 +
To do this:
 +
 +
# Click on the pay method in the '''[[Clients:Summary_Tab|Summary]]''' tab of the client profile.
 +
# Click '''Delete''' to [[Clients:Summary_Tab#Removing_Card_Details|remove the pay method]] and any associated mandates.
 +
 
 +
== Reconfiguring Callbacks ==
 +
 
 +
After moving WHMCS, you must perform the following steps:
 +
 
 +
# Go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Payment Gateways]]''' or, prior to WHMCS 8.0, '''Setup >  Payments > Payment Gateways'''.
 +
# Click '''Configure GoCardless Account Connection'''.
 +
# Log in again using the same details.
 +
 
 +
This ensures that GoCardless stores and uses the new system URL and gateway callback file URL.
 +
 
 +
== Troubleshooting ==
 +
 
 +
===Access token not active===
 +
 
 +
You can only connect each GoCardless account to a single WHMCS at a time. If you connected the GoCardless Account to multiple WHMCS installations, only the last installation that you connected will function correctly. Previously-connected WHMCS installations will show an <tt>Access token not active</tt> error at '''Billing > [[Gateway Log]]'''.
 +
 
 +
To resolve this error, you will need to reconnect WHMCS to GoCardless by [[#Reconfiguring_Callbacks|reconfiguring callbacks]].  
  
==Reconfiguring Callbacks==
+
===Remote Storage "create" action did NOT provide token===
After moving WHMCS, it is important that you navigate to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > Payment Gateways''' or, prior to WHMCS 8.0, '''Setup >  Payments > Payment Gateways''' and click '''Configure GoCardless Account Connection''' and sign back in using the same details. This will ensure that the new System URL and Gateway callback file URL are stored and used for existing and new mandates going forward.
+
This error indicates that the GoCardless account does not have access to the required API endpoint. Due to GoCardless API restrictions, you must contact GoCardless support to enable the feature for your account.
  
 
{{modules}}
 
{{modules}}

Latest revision as of 12:18, 14 April 2024

About this Module

We added this payment gateway in WHMCS 7.7.

GoCardless is a payment gateway which allows for direct debit payments to be automated electronically.

Important
Due to GoCardless API restrictions, you must contact GoCardless support to enable the feature.

Supported Features

Type One Time Recurring Refunds Reversals
3rd Party Yes Yes No

Yes

Adding the GoCardless Payment Gateway

To set up the GoCardless payment gateway in WHMCS:

  1. Go to the appropriate location for your version of WHMCS:
    • For WHMCS 8.0 and later, go to Configuration () > Apps & Integrations or Addons > Apps & Integrations.
    • For WHMCS 7.10 and earlier, go to Setup > Products/Services > Payment Gateways and choose All Payment Gateways.
  2. Click GoCardless. A GoCardless login page will appear.
  3. Either sign up for a new account or log in to your existing account. The system will automatically configure GoCardless for you.
  4. Optionally, enter a custom name for the gateway for each of your supported currencies.
  5. Check Show on Order Form to display this payment method in the Client Area during checkout.
  6. In WHMCS 8.0 and later, enabling Charge Date Preference will allow the automation system to omit passing a charge_date value to GoCardless when the automation system triggers a payment attempt. This results in GoCardless starting the transaction as soon as possible.
  7. Click Save Changes.

Charge Date Preference

Charge Date Preference will determine if WHMCS passes a transaction charge date to GoCardless advising when to initiate the payment.

  • Disabling the option will pass through either the Next Due Date from the service or the next_possible_charge_date that GoCardless sets using the charge_date function depending on which date is later.
  • If you enable the option, the system will not pass a charge_date value to GoCardless and this will result in GoCardless beginning the payment process as soon as possible.
 In both scenarios, the payment attempt call to GoCardless will not occur until an invoice meets the invoice and payment capture attempt criteria that you set at Configuration () > System Settings > Automation Settings.

To process the payment prior to the Next Due Date date and according to the Process Days Before Due date at Configuration () > System Settings > Automation Settings, enable this setting. If you do not, the system may attempt the payment on or after the Next Due Date date.

Supported Currencies

GoCardless only support the following currencies:

  • AUD
  • CAD
  • DKK
  • EUR
  • GBP
  • NZD
  • SEK
  • USD
    We added support for USD in WHMCS 7.9.

Clients who do not use one of these currencies cannot make payments using GoCardless.

Test Mode

You can use test mode to simulate payment processing without actually causing a transaction to occur. This can be useful to test your configuration.

Payment Workflow

When the first payment is made, a mandate is set up with the client's bank. This typically takes a few days, so the invoice will change from Unpaid to Payment Pending status. At this point, you can view the mandate details and expected payment completion date by viewing the invoice. As soon as the mandate is set up and the first payment has cleared, the invoice's status will change to Paid and the service will be provisioned by WHMCS automatically.

When the renewal invoice is generated for a recurring service, a capture attempt will be made against the mandate in accordance with Process Days Before Due in Configuration () > System Settings > Automation Settings or, prior to WHMCS 8.0, Setup > Automation Settings. As it can take a few days for the payment to complete, we recommend a setting of 3. This way, 3 days before the invoice Due Date, the payment process will be initiated by the cron and the invoice status updated from Unpaid to Payment Pending. Payment should then complete on the invoice Due Date and the invoice will be marked Paid once the payment has cleared.

After you create a mandate, WHMCS can process renewal payments for any other services associated with the client, as long as they also use the GoCardless gateway.

The system redirects clients to GoCardless to enter their bank details when setting up a mandate. Then, GoCardless returns them to WHMCS after the setup is complete. The system submits personal bank information directly to GoCardless and never stores it in your local WHMCS installation.

Reversed Payments

The Direct Debit Guarantee scheme allows the payee to file a claim for any payment taken in error. WHMCS will monitor for charged_back events from GoCardless and will automatically process these as appropriate.

To learn more, visit Payment Reversals

Refunding Payments

While refunds with GoCardless are not directly supported from within WHMCS, they can still be processed directly with GoCardless on a case-by-case basis through their review and approval process.

Please refer to the refunding payments section of the GoCardless documentation.

Mandates

We added these features in WHMCS 7.8.

Reinstating Mandates

Reinstating mandates requires specific permission from GoCardless.

When a mandate has been accidentally cancelled, WHMCS can initiate steps to reinstate the mandate without having the client set it up again.

To do this:

  1. Go to the appropriate location for your version of WHMCS:
    • For WHMCS 8.6 and later, go to Configuration () > System Settings > Payment Gateways.
    • For WHMCS 8.0 and later, go to Configuration () > System Settings > Payment Gateways and choose Manage Existing Gateways.
    • For WHMCS 7.10 and earlier, go to Setup > Products/Services > Payment Gateways and choose Manage Existing Gateways.
  2. Click Manage Cancelled Mandates.
  3. Follow the instructions in the modal that appears to reinstate a cancelled mandate.

Importing Existing Mandates

You must disable any automatically-charged mandates that you import in order to prevent possible duplicate charges.

You can import mandates that you set up outside of WHMCS and associate them with a client.

To do this:

  1. Go to the appropriate location for your version of WHMCS:
    • For WHMCS 8.6 and later, go to Configuration () > System Settings > Payment Gateways.
    • For WHMCS 8.0 and later, go to Configuration () > System Settings > Payment Gateways and choose Manage Existing Gateways.
    • For WHMCS 7.10 and earlier, go to Setup > Products/Services > Payment Gateways and choose Manage Existing Gateways.
  2. Click Import Existing Mandates.
  3. Follow the instructions in the modal that appears to import a active mandate to a specific client.

Removing Mandates

You can remove mandates by deleting the client's GoCardless pay method.

To do this:

  1. Click on the pay method in the Summary tab of the client profile.
  2. Click Delete to remove the pay method and any associated mandates.

Reconfiguring Callbacks

After moving WHMCS, you must perform the following steps:

  1. Go to Configuration () > System Settings > Payment Gateways or, prior to WHMCS 8.0, Setup > Payments > Payment Gateways.
  2. Click Configure GoCardless Account Connection.
  3. Log in again using the same details.

This ensures that GoCardless stores and uses the new system URL and gateway callback file URL.

Troubleshooting

Access token not active

You can only connect each GoCardless account to a single WHMCS at a time. If you connected the GoCardless Account to multiple WHMCS installations, only the last installation that you connected will function correctly. Previously-connected WHMCS installations will show an Access token not active error at Billing > Gateway Log.

To resolve this error, you will need to reconnect WHMCS to GoCardless by reconfiguring callbacks.

Remote Storage "create" action did NOT provide token

This error indicates that the GoCardless account does not have access to the required API endpoint. Due to GoCardless API restrictions, you must contact GoCardless support to enable the feature for your account.

Server Modules
cPanel/WHM - DirectAdmin - Plesk - Helm 3 - Helm 4 - Ensim - InterWorx - WebsitePanel - Cloudmin
Lxadmin - Virtualmin Pro - XPanel - HyperVM - SolusVM - Cloudmin - WHMSonic - VPS.Net
CentovaCast - SCPanel - MediaCP - GameCP - TCAdmin - Reseller Central - Auto Release - Heart Internet

Registrar Modules
Enom - ResellerClub - Nominet - OpenSRS - ResellOne - OnlineNIC - PlanetDomain - Affordable Domains
TPP Wholesale - TPPInternet - Stargate - Namecheap - NetEarthOne - Bizcn - InternetBS - GMO Internet
12Register - Registercom - DotDNS - WebNIC - Dot.TK - HexoNet - Realtime Register - Registereu
RRPProxy - ResellerCamp - TransIP - Heart Internet - IPMirror - NetRegistry - OVH - VentraIP Wholesale
Email - 101Domain

Fraud Modules
MaxMind - VariLogiX FraudCall - Telesign

Gateway Modules
2CheckOut - AsiaPay - Auth.net Echeck - Authorize.net - Authorize.net CIM - Bank Transfer - BidPay
BluePay - BluePay Echeck - BluePay Remote - Boleto - CashU - CC Avenue - ChronoPay - Direct Debit
EMatters - E-Path - eProcessingNetwork - eWAY Tokens - F2B - Finansbank - GarantiBank - Gate2Shop
Inpay - InternetSecure - IP.Pay - Kuveytturk - Modulo Moip - Mail In Payment - Merchant Partners
Merchant Warrior - IDEALMollie - Moneris - Moneris Vault - Skrill 1-Tap - NaviGate - NETbilling
Netregistry Pay - NoChex - Offline Credit Card - Optimal Payments - PagSeguro - Payflow Pro - Pay Junction
Paymate AU and NZ - Payment Express - PayPal - PayPal Card Payments - PayPal Express Checkout
PayPal Payments - PayPal Payments Pro - PayPoint.net (SecPay) - Payson - Planet Authorize - ProtX VSP Form
PSIGate - Quantum Gateway - Quantum Vault - SagePay - SagePay Tokens v2 - SecurePay
SecurePay AU - Secure Trading - TrustCommerce - USA ePay - WorldPay - WorldPay Invisible