Difference between revisions of "Pay Methods"

From WHMCS Documentation

 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Introduction==
+
In WHMCS, a Pay Method is a payment method that belongs to a client. It can represent a credit card or a bank account. Clients can choose any of their available payment methods during checkout for new orders and for payment of invoices. Each individual payment method has an associated '''[[Payment Gateways|Payment Gateway]]''' and can also have a different associated billing address.
  
In WHMCS, a Pay Method is a method of payment belonging to a client. A Pay Method can represent a credit card or a bank account and a client can have multiple Pay Methods associated with their account.
+
<div class="docs-alert-info">
 +
The following settings in the '''[[Security Tab|Security]]''' tab at '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > General Settings''' affect payment method behavior:
  
Clients can choose any of their available Pay Methods during checkout both for new orders and payment of invoices.
+
* '''Allow Client Pay Method Removal'''
 
+
* '''Delete Encrypted Credit Card Data'''
Each Pay Method can also have a different billing address associated with it if required.
+
* '''Delete Encrypted Bank Account Data'''
 +
</div>
  
 
==Default Pay Method==
 
==Default Pay Method==
  
There must always be a default Pay Method and this is the Pay Method that is used by default for all automatic recurring payment attempts.
+
Clients must always have a default payment method. This is the payment method that all new automatic recurring payment attempts use by default.
  
In certain conditions, the default Pay Method may not be applicable for a given invoice, for example when the default Pay Method is tokenized with a specific payment gateway and the invoice's payment method is a different gateway. In this scenario, the first applicable Pay Method for the user in order of display is used.
+
In some scenarios, the default payment method may not be valid for a specific invoice (for example, when the default payment method is tokenized with a specific payment gateway and the invoice's payment method uses a different payment gateway). If this occurs, the system uses the client's first applicable payment method.
  
<div class="docs-alert-info">'''Please Note:''' At this time, it is not possible to set a different default Pay Method on a per service basis, although this functionality is planned to be delivered in a future update.</div>
+
<div class="docs-alert-warning">
 +
* You cannot set a different default payment method on a per-service basis.
 +
* Changing the default payment method will not change the payment method that existing unpaid invoices use.
 +
</div>
  
 
==Managing Pay Methods==
 
==Managing Pay Methods==
Line 19: Line 24:
 
===Admin Area===
 
===Admin Area===
  
A Clients' Pay Methods can be viewed via a dedicated panel on the Client Summary page within the Admin Area.
+
You can manage client payment methods from the '''[[Clients:Summary_Tab|Summary]]''' tab of the client profile.
 
 
The default Pay Method will always be displayed at the top of the list, and be indicated via an icon.
 
 
 
Clicking on any Pay Method within the list will open a popup that allows you to view and manage the selected Pay Method.
 
  
 
[[File:Paymethod-admin-area-v3.png]]
 
[[File:Paymethod-admin-area-v3.png]]
 
<div class="docs-alert-warning">CVV codes can be entered during attempts to capture payment.</div>
 
 
The following actions are available:
 
 
* '''Decrypt Card Number''' - Credit card numbers are always displayed masked, only revealing the last 4 digits. To view the full card number, click the eye icon located to the right of the Card Number field and enter the ''Credit Card Encryption Hash'' when prompted.
 
* '''Edit''' - For an existing Pay Method you can edit certain fields and values. In the case of a credit card, this includes the Expiry Date and Card Description. In the case of a bank account, this includes the Account Holder Name, Account Number, Routing Number and Bank Account Description.
 
* '''Delete''' - To delete a Pay Method, first click on the Pay Method to open the edit window, and then click the Delete button. You will be asked for confirmation before the deletion is completed.
 
 
<div class="docs-alert-warning">The Credit Card Encryption hash can be found within the WHMCS configuration.php file located within the root directory of a WHMCS installation.</div>
 
 
To add a new Pay Method, click the "Add Credit Card" or "Add Bank Account" links located within the Pay Methods panel on the Client Summary page. A popup will open allowing you to enter the details for the Pay Method.
 
 
<div class="docs-alert-info">Note that these options will only display if you have an appropriate Payment Gateway activated. If you do not have either an active merchant gateway and/or bank account module, then no options to add Pay Methods will be displayed.</div>
 
 
When multiple Payment Gateways are active, and include a combination of both local card storage and tokenized payment gateway modules, upon selecting to add a credit card, you will be prompted for the Storage Method you wish to use. Essentially you need to tell WHMCS if the card should be tokenized with your desired Payment Gateway, or stored locally and encrypted in the database. In most cases if you have a tokenization payment gateway in use, you will probably want to use this.
 
 
====Force Delete====
 
If an error occurs deleting a remote Pay Method, or if the gateway that a remote Pay Method is associated with has been deactivated, WHMCS will be unable to delete the record. When this happens, a message will be shown displaying the error that occurred and providing an option to ignore and force delete the Pay Method.
 
[[File:PayMethodDeleteFail.png]]
 
 
Force deleting a Pay Method will not run anything on the remote gateway system. Manual removal of any records in a gateway account would need to be done manually if required, when force deleting from WHMCS.
 
  
 
===Client Area===
 
===Client Area===
  
Clients can view and manage Pay Methods via the "Payment Methods" page accessible from the Billing and Account sub-menus within the Client Area.
+
Clients can view and manage payment method at '''Billing > Payment Methods''' in the Client Area.
  
[[File:payment-methods.png]]
+
[[File:payment-methods.png|400px]]
  
Clients can view all of their saved Pay Methods, edit (update descriptions and expiry date), delete (if enabled) and change the default Pay Method used for automated recurring payment attempts.
+
Clients can view all of their saved payment methods, update their descriptions and expiry dates, delete them (if you enable this), and change the default payment method for automated recurring payment attempts.
  
 
<div class="docs-alert-warning">
 
<div class="docs-alert-warning">
If you have multiple Payment Gateways active, including a mix of both Tokenized and non-tokenized Payment Gateways, customers will be presented with the option to choose the desired Payment Method when adding a Pay Method via the Client Area. This is essential for knowing whether the card should be stored locally encrypted in the WHMCS database, or remotely with the Tokenized Payment Gateway. If you do not wish to allow customers to store cards locally, please refer to the ''Enforcing Tokenization'' section below.
+
If you use tokenized and non-tokenized payment gateways, customers can choose the desired payment method when adding one via the Client Area. This determines whether to store the card locally, encrypted in the WHMCS database, or remotely with the tokenized payment gateway.
 
</div>
 
</div>
  
 
==Processing Payments==
 
==Processing Payments==
  
Automated recurring charges will be attempted for capture automatically using the default Pay Method for a given client.
+
The system attempts recurring charges for capture automatically using the client's default payment method. If no payment method exist for a client, the client will receive an email informing them that the system could not attempt an automated payment and that they must log in and pay the invoice manually.
 
 
If no Pay Methods exist for a client, the client will receive an email informing them that an automated payment could not be attempted and that they must login and pay the invoice manually.
 
 
 
To use a different card, client can login and pay an unpaid invoice manually at any time via the Client Area.
 
  
Admin Area users can also attempt a capture at any time using any stored Pay Method. To do this, navigate to the desired invoice within the Admin Area and click the Attempt Capture button. ''If this button does not appear or is disabled, check the Payment Method that the invoice is assigned to via the Options tab.''
+
=== Changing Payment Methods ===
  
Upon clicking the Attempt Capture button, a popup window will appear allowing you to choose the desired Pay Method to be used. Select the desired entry, optionally enter the CVV number for the card if available, and then click the Attempt Capture button to attempt the payment.
+
To use a different card, clients can log in to the Client Area and pay the unpaid invoice manually.
  
==Related Settings==
+
=== Capturing Payment Using a Stored Payment Method ===
  
The following settings affect the behaviour of Pay Method functionality and can be found in '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > General Settings > Security''' or, prior to WHMCS 8.0,  '''Setup > General Settings > Security''':
+
Admins can also attempt to capture payment at any time using a stored payment method.  
  
* Allow Client CC Removal - Enabling this option allows customers to delete saved Pay Methods from their account. It also provides customers with a choice during checkout to allow them to choose to store the payment details they are entering as a saved Pay Method for faster checkouts in future. ''We recommend leaving this option enabled.''
+
To do this:
  
* Delete Encrypted Credit Card Data - This option allows you to perform a mass-deletion of all encrypted credit card data that is stored within the WHMCS database. You can use this if you want to instantly and immediately remove all sensitive pay method related data from the database. Note that this action cannot be un-done so exercise caution before using this functionality.
+
# Go to the desired invoice in the [[Admin Area]].
 +
# Click '''Attempt Capture'''. If '''Attempt Capture''' does not appear or is disabled, check the invoice's assigned payment method in the '''Options''' tab.
 +
# Choose the desired payment method to use.
 +
# Optionally, enter the CVV number for the card.
 +
# Click '''Attempt Capture''' to attempt the payment.

Latest revision as of 12:55, 19 December 2023

In WHMCS, a Pay Method is a payment method that belongs to a client. It can represent a credit card or a bank account. Clients can choose any of their available payment methods during checkout for new orders and for payment of invoices. Each individual payment method has an associated Payment Gateway and can also have a different associated billing address.

The following settings in the Security tab at Configuration () > System Settings > General Settings affect payment method behavior:

  • Allow Client Pay Method Removal
  • Delete Encrypted Credit Card Data
  • Delete Encrypted Bank Account Data

Default Pay Method

Clients must always have a default payment method. This is the payment method that all new automatic recurring payment attempts use by default.

In some scenarios, the default payment method may not be valid for a specific invoice (for example, when the default payment method is tokenized with a specific payment gateway and the invoice's payment method uses a different payment gateway). If this occurs, the system uses the client's first applicable payment method.

  • You cannot set a different default payment method on a per-service basis.
  • Changing the default payment method will not change the payment method that existing unpaid invoices use.

Managing Pay Methods

Admin Area

You can manage client payment methods from the Summary tab of the client profile.

Paymethod-admin-area-v3.png

Client Area

Clients can view and manage payment method at Billing > Payment Methods in the Client Area.

Payment-methods.png

Clients can view all of their saved payment methods, update their descriptions and expiry dates, delete them (if you enable this), and change the default payment method for automated recurring payment attempts.

If you use tokenized and non-tokenized payment gateways, customers can choose the desired payment method when adding one via the Client Area. This determines whether to store the card locally, encrypted in the WHMCS database, or remotely with the tokenized payment gateway.

Processing Payments

The system attempts recurring charges for capture automatically using the client's default payment method. If no payment method exist for a client, the client will receive an email informing them that the system could not attempt an automated payment and that they must log in and pay the invoice manually.

Changing Payment Methods

To use a different card, clients can log in to the Client Area and pay the unpaid invoice manually.

Capturing Payment Using a Stored Payment Method

Admins can also attempt to capture payment at any time using a stored payment method.

To do this:

  1. Go to the desired invoice in the Admin Area.
  2. Click Attempt Capture. If Attempt Capture does not appear or is disabled, check the invoice's assigned payment method in the Options tab.
  3. Choose the desired payment method to use.
  4. Optionally, enter the CVV number for the card.
  5. Click Attempt Capture to attempt the payment.