PayPal Basic
We deprecated this module in WHMCS 8.11.
- In WHMCS 8.9 and later, we strongly recommend using the PayPal Payments payment gateway module instead.
- In WHMCS 8.11 and later, if PayPal Payments and PayPal Basic are both enabled, WHMCS will transition PayPal Basic invoices and subscriptions to use PayPal Payments as the preselected payment method.
- Do not deactivate PayPal Basic if you want to use this method to migrate to PayPal Payments.
- For more information, see Automated Transition from Legacy PayPal Modules and Unexpected PayPal Cancellation Emails.
The PayPal® Basic payment gateway module is available in WHMCS.
Supported Features
Type: Third-Party
One-Time | Recurring | Refunds | Reversals |
✓ | ✓ | ✓ | ✓ |
3D Secure | Remote Update Card | Remote Delete Card | AddPayMethod API |
✖️ | ✖️ | ✖️ | ✖️ |
Adding the PayPal Basic Payment Gateway
To set up the PayPal Basic payment gateway in WHMCS:
- Go to Configuration () > Apps & Integrations or Addons > Apps & Integrations.
- Click PayPal Basic.
- Check Show on Order Form to display this payment method in the Client Area during checkout.
- Enter your PayPal Basic credentials. PayPal Email is required and all other values are optional.
- For PayPal Email, enter one or more email addresses associated with your PayPal account, comma-delimited.
- Configure Instant Payment Notification using the steps below.
- Check Force One Time Payments to only allow clients to make one-time payments (disabling subscriptions). For recurring services, clients must log in and pay each invoice.
- Check Force Subscriptions to only allow clients to make subscription payments (disabling one-time payments). The system will send future payments automatically.
- Check Require Shipping Address to require clients to provide a shipping address on the PayPal website to associate with their payment at PayPal. We recommend this if you are selling physical products or require PayPal Seller Protection.
- Check Client Address Matching to associate the details that the client provides while ordering with their payment in PayPal. They will not be able to provide different detals on the PayPal website and must update their details from within the Client Area. Alternately, you can update client details in the Profile tab of the client profile.
- For API Username, API Password, and API Signature, enter your PayPal account’s credentials:
- Log in to your PayPal account.
- Go to Account Settings by hovering over your name in the top-right corner.
- Click Update next to API Access.
- Under NVP/SOAP API integration, click Manage API credentials.
- Choose Request API signature.
- Click Agree and Submit.This allows you to issue refunds from within WHMCS instead of logging in via PayPal. For more information, see Automated Refunds.
- Click Save Changes.
Sandbox Mode
You can use test mode to simulate payment processing without actually causing a transaction to occur. This can be useful for testing your configuration.
- To use this, you must create a PayPal sandbox account.
- If your sandbox API credentials differ from your live account’s, you must update them in your configuration and reset them when you finish testing.
Instant Payment Notification
When you enable Instant Payment Notification (IPN) in your PayPal account, the system will automatically mark invoices as paid when you receive payments.
To enable IPN:
- Log in to your PayPal account.
- Click the settings icon (usually your name) at the top of your PayPal account page.
- Click Account Settings.
- Select Notifications on the left-hand menu.
- Click Update for Instant Payment Notifications.
- Click Choose IPN Settings (or Edit Settings if it is already enabled).
- Enter your WHMCS System URL (for example,
https://www.example.com/whmcspath/
). - Select Receive IPN messages (Enabled).
- Click Save.
Charset Configuration
PayPal defaults the charset for most accounts to windows-1252
. Occasionally, this can cause accented characters to return incorrectly through IPN, causing an IPN Handshake Invalid message. Because of this, we strongly recommend that you set the charset in your PayPal account to match your WHMCS installation.
To change the charset:
- Go to PayPal’s Language Encoding.
- Click More Options.
- Select a charset. The default value in WHMCS is
UTF-8
. - Select Yes.
- Click Save.
PayPal Subscriptions/Recurring Billing
- In WHMCS 8.11 GA and later, if you have activated PayPal Payments, WHMCS will automatically transition a client’s PayPal Basic subscriptions to use vaulting with PayPal Payments the first time that the client uses PayPal to make a payment.
- When WHMCS transitions a client’s subscriptions, the client may receive a notification from PayPal about the subscription cancellation. PayPal sends this email to your client automatically, but it does not indicate a problem. For more information, see Unexpected PayPal Cancellation Emails.
By default, when a user views an invoice for a recurring product or service, a PayPal Subscribe option will appear. This allows the user to subscribe and send automatic payments on the appropriate billing society.
Invoices are eligible for subscriptions if they meet all of the following conditions:
- The invoice’s Due Date must be in the future.
- The invoice must contain at least one recurring product (for example, invoices that only contain domains, billable items, or addons won’t create subscriptions).
- Force One Time Payments is not checked on the payment gateway configuration page.
If an invoice contains a product and addons or domains, any items that match the product’s billing cycle will also be part of the subscription. For example, if an invoice contains a product, an addon, and a domain that all recur on an annual basis, the PayPal subscription that WHMCS creates would be for the total amount of all three items. The subscription amount would pay the renewal invoice in full automatically.
Subscriptions cannot, however, contain different amounts recurring on different terms. For example, a single subscription cannot create recurring payments of one amount monthly and another amount annually.
Customizing Invoice Emails for Subscriptions
WHMCS stores the PayPal-issued subscription ID number as Subscription ID for the product and removes it when cancelling the subscription. Because of this, you can use the ID value to determine whether a subscription exists and customize the displayed text in invoice-related emails.
For example, you could customize the Invoice Created email template to show different instructions to the customer if a subscription exists:
{if $invoice_subscription_id}
As you have a PayPal Subscription setup, payment will be taken automatically within the
next few days. Make certain that you have enough funds in your PayPal account to cover it.
{else}
You can login to your Client Area to view and pay the invoice at {$invoice_link}
{/if}
Automatic Subscription Management
If you enable Automatic Subscription Management, WHMCS will attempt to automatically cancel PayPal subscriptions.
For more information, see Automatic Subscription Management.
Automated Refunds
You can issue refunds for PayPal payments directly from within WHMCS. Before you can do this, you must set up PayPal API access.
To do this:
- Log in to PayPal.
- Go to Tools > All Tools > API credentials > NVP/SOAP API integration (Classic).
- Click Manage API Credentials under NVP/SOAP API integration (Classic).
- Generate a new set of credentials or note the current credentials.
- Copy the provided username, password, and signature.
- Click Done.
- Enter the details at Configuration () > System Settings > Payment Gateways.
Troubleshooting
Invalid Receiver Email
WHMCS validates the payment receiver email value against the details at Configuration () > System Settings > Payment Gateways. This error indicates that the details do not match.
If you use multiple PayPal accounts to receive payment or a single PayPal account has multiple email addresses, you must specify them in a comma-separated list (for example, [email protected],[email protected]
).
The system will use the first email in the list for new payments but will accept any email address for invoice payments.
Not Supported
This error indicates that an action occurred that does not require any action from WHMCS. For example, a txn_type
value of subscr_failed
indicates that a subscription payment failed, and subscr_eot
indicates the end of the subscription term.
You will see these entries under normal operation and they do not indicate a problem.
Unrecognized Currency
This error in the Gateway Log indicates an invalid currency code in Configuration () > System Settings > Currencies.
A currency code must use the ISO 4217 standard. For example, EURO
is not valid, but EUR
is valid.
You may need to check for blank spaces at the beginning or end of the currency code.
IPN Handshake Invalid
This error in the Gateway Log indicates that WHMCS cannot verify that the callback is from PayPal. To correct this issue, check your Charset Configuration.
IPN Handshake Error
This error in the Gateway Log indicates that the system received the IPN from PayPal but could not verify it. Typically, this occurs because connection to PayPal’s callback verification service at https://www.paypal.com/cgi-bin/webscr
failed, usually because the cURL connection does not use the required protocols. TLS 1.2 and HTTP/1.1 are mandatory for communication with PayPal.
The WHMCS PayPal module does not specify a particular cryptographic protocol when communicating with PayPal. Instead, cURL on your server should automatically negotiate the best protocol to use. Work with your hosting provider or system administrator to ensure TLS 1.2 or greater is the default protocol on the server and that you can successfully connect to PayPal’s callback verification service.
You can check connection using cURL from your servers command line:
curl -I https://www.paypal.com/cgi-bin/webscr
Things don’t appear to be working at the moment
This error indicates that your system has sent invalid details to PayPal. This could be invalid client details (for example, the address or postcode) or a misconfiguration in the WHMCS settings (for example, an invalid currency code).
To troubleshoot this issue, view the page source in the Client Area and examine the PayPal payment button HTML code. Look for any invalid variables and edit the client’s profile or the system settings to correct them.
If the currency_code
value is not in the PayPal API’s supported currency list, you can use Convert to For Processing to convert the payment amount into a currency that PayPal supports.
Last modified: November 19, 2024