Difference between revisions of "PayPal Checkout"

From WHMCS Documentation

m (Limitations/Restrictions)
Line 1: Line 1:
<div class="docs-alert-info"><i class="fa fa-info-circle"></i> PayPal Checkout is a new PayPal module that's available in WHMCS 7.9 and later.<br/>
+
== About this Module ==
Looking for the PayPal Basic module documentation? [[PayPal Basic|Go here]]</div>
 
 
The latest PayPal module leverages PayPal Checkout and PayPal's Smart Button technology, which PayPal describes as follows:
 
 
PayPal Checkout with Smart Payment Buttons gives your buyers a simplified and secure checkout experience. PayPal intelligently presents the most relevant payment types to your shoppers, automatically, making it easier for them to complete their purchase using methods like Pay with Venmo, PayPal Credit, credit card payments, iDEAL, Bancontact, Sofort, and other payment types."
 
 
   
 
   
 +
<div class="docs-alert-success">
 +
We added this PayPal module in WHMCS 7.9. WHMCS also includes a [[PayPal Basic]] module.
 +
</div>
 +
 +
PayPal Checkout with Smart Payment Buttons gives your buyers a simplified and secure checkout experience. PayPal Checkout presents the most relevant payment types with methods like Pay with Venmo, PayPal Credit, credit card payments, iDEAL, Bancontact, Sofort, and other payment types.
 
{{gateways
 
{{gateways
 
| onetime = yes
 
| onetime = yes
Line 11: Line 11:
 
| refunds = yes
 
| refunds = yes
 
}}
 
}}
 +
== Adding the PayPal Payment Gateway ==
 +
 +
To set up the PayPal payment gateway in WHMCS:
  
Carts that only have '''One-Time''', '''Biennial''', or '''Triennial''' Payment items will immediately include Express Checkout buttons. For carts that contain at least one recurring item (on a '''Monthly''' or '''Annual''' billing cycle), the client can proceed through the standard WHMCS checkout routine and select PayPal as the payment method. Upon placing an order, they will be redirected to PayPal to create a subscription.
+
# Ensure that your WHMCS installation uses an HTTPS-secured connection with a valid [https://www.whmcs.com/ssl-certificates SSL certificate]. If it does not, this module will not function correctly.
+
# Go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Payment Gateways]]''' or, prior to WHMCS 8.0, '''Setup > Products/Services > Payment Gateways'''.
==Express Checkout==
+
# Choose the '''Featured Payment Gateways''' tab.
+
# Click '''Activate & Configure''' for '''PayPal'''.
With PayPal Checkout, users can elect to check out using PayPal.
+
# When the system prompts you, log in to your existing PayPal account or sign up for a new one.
+
# When the system prompts you, confirm permission for the WHMCS application to access your account.  
Clicking any '''Checkout with PayPal''' button will launch a modal-based payment authorization process.
+
# Click '''Confirm''' to continue. API credentials will populate and WHMCS will save them automatically. The page will refresh.
+
# Check '''Show on Order Form''' to display this payment method in the Client Area during checkout.
Users will be asked to log in to their PayPal accounts and confirm they approve payment before being returned to the WHMCS shopping cart to complete the checkout process.
+
# Click '''Save Changes'''.
+
 
For new customers who are placing an order for the first time, upon completing the PayPal Checkout workflow, the registration form will pre-fill the name, email and billing address to speed up the checkout process. For existing users, those who are not logged in will see the login screen with their email address pre-filled.
+
=== Migrating from PayPal Basic ===
 
Below is the '''View Cart''' step of the order process, showing the PayPal Checkout options in addition to the default '''Checkout''':
 
 
[[File:Paypal-checkout-cart-buttons.png]]
 
 
Users who elect to use the express checkout options of PayPal Checkout will not see a payment method choice during checkout post authorization of payment by PayPal. They will instead see a message indicating they have pre-approved payment with PayPal.
 
 
==SSL Requirement==
 
 
PayPal Checkout requires an HTTPS secured connection to create the link between WHMCS and PayPal correctly. If the your WHMCS installation's domain does not have a valid SSL certificate, the payment return will not work.
 
 
To update your system URL to <tt>https</tt>, navigate to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > General Settings''' and update the '''WHMCS System URL''' setting to ''https://'' accordingly.
 
 
If you need to purchase an SSL certificate, you can do so [https://www.whmcs.com/ssl-certificates www.whmcs.com/ssl-certificates here].
 
 
==Getting Started==
 
 
[[File:Paypal activate.png|thumb|PayPal Activate & Configure]][[File:Paypal activate2.png|thumb|PayPal Configuration Complete]]
 
 
To activate and configure PayPal Checkout for use in WHMCS:
 
* Log in to the WHMCS admin area and navigate to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > Payment Gateways'''.
 
* Click '''Activate & Configure''' in the PayPal section.
 
* When the system prompts you, log in to your existing PayPal account or sign up for a new one.
 
* When the system prompts you, confirm permission for the WHMCS application to access your account. Click '''Confirm''' to continue.
 
 
API credentials will populate and WHMCS will save them automatically. The page will refresh and, once you see the green success notification, you have completed the setup process.
 
 
You can now begin using the PayPal Checkout module.
 
  
<div class="docs-alert-info">
+
For help to migrate to the '''PayPal''' module from '''PayPal Basic''', see the [[PayPal_Checkout_Migration_Guide|PayPal Checkout Migration Guide]].
<i class="fa fa-question-circle"></i>
 
WHMCS 8.3 and higher includes support for disputes for Stripe and PayPal® transactions at '''Billing > [[Disputes]]'''.
 
</div>
 
 
<div class="docs-alert-danger">
 
<span class="title">Unlink PayPal Account</span><br />
 
'''Unlink PayPal Account''' will irreversibly remove the link to your PayPal account. Subscription payments will no longer be recorded in WHMCS. Do '''not''' use this option if there are PayPal subscriptions you wish to keep.
 
</div>
 
<div class="docs-alert-info">
 
<span class="title">Migrating from PayPal Basic?</span><br />
 
Refer to to the [[PayPal_Checkout_Migration_Guide|PayPal Checkout Migration Guide]] for uninterrupted service for legacy subscriptions.
 
</div>
 
  
==Limitations/Restrictions==
+
=== Limitations and Restrictions ===
 
   
 
   
 
The following limitations and restrictions apply to PayPal Checkout:
 
The following limitations and restrictions apply to PayPal Checkout:
Line 76: Line 39:
 
* The system will offer clients the subscription option if they are ordering a recurring product on a monthly or annual billing cycle. The modules configuration does not offer an option to force only one-time payments.
 
* The system will offer clients the subscription option if they are ordering a recurring product on a monthly or annual billing cycle. The modules configuration does not offer an option to force only one-time payments.
  
==Updating PayPal Webhook URL==
+
=== Unlinking Your PayPal Account ===
 +
 
 +
<div class="docs-alert-warning">
 +
Do '''not''' use this option if there are PayPal subscriptions you wish to keep.
 +
</div>
 +
 
 +
Clicking '''Unlink PayPal Account''' will irreversibly remove the link to your PayPal account. Subscription payments will no longer be recorded in WHMCS.
 +
 
 +
=== Updating the PayPal Webhook URL ===
 +
 
 +
If your WHMCS installation's URL has changed because you moved it, you must update the webhook URL in PayPal. This will allow WHMCS to continue to record transactions.
 +
 
 +
To update the PayPal webhook URL:
 +
 
 +
# Log in to https://developer.paypal.com/developer/applications.
 +
# Select '''Live''', which will then display the WHMCS app.
 +
# Click on the app name.
 +
# Scroll down to the '''Live Webhooks''' section and click the edit (pencil) icon.
 +
# Update the '''Webhook URL''' to the correct address, ending with <tt>/modules/gateways/callback/paypalwebhooks.php</tt>.
 +
# Click '''Save'''.
 +
 +
== Checkout ==
 +
 +
With PayPal Checkout, users can elect to check out using PayPal.
 +
 
 +
Clicking any '''Checkout with PayPal''' will launch a modal-based payment authorization process. Users will log in to their PayPal accounts and confirm their payment before returning to WHMCS to complete the checkout process.
 +
 +
* When first-time customers return to WHMCS, the registration form will pre-fill the name, email, and billing address.
 +
* Existing users who have not already authenticated will see the login screen with their email address pre-filled.
 +
 +
The '''View Cart''' step of the order process will display the PayPal Checkout options in addition to the default '''Checkout''':
 +
 +
[[File:Paypal-checkout-cart-buttons.png]]
 +
 
 +
=== Express Checkout ===
  
If your WHMCS installation's URL has changed because you moved it, the webhook URL configured with PayPal will need to be updated. This will allow transactions to continue to be recorded in WHMCS.
+
Express checkout users will not see a payment method choice after authorizing payment by PayPal. Instead, they will see a message indicating that they have pre-approved payment.
  
To update the PayPal webhook URL, follow the steps below:
+
Carts that only have '''One-Time''', '''Biennial''', or '''Triennial''' Payment items will immediately include Express Checkout buttons. For carts that contain at least one recurring item (on a '''Monthly''' or '''Annual''' billing cycle), the client can proceed through the standard WHMCS checkout routine and select PayPal as the payment method. Upon placing an order, they will be redirected to PayPal to create a subscription.
 +
 +
== Disputes ==
  
#Log in to https://developer.paypal.com/developer/applications.
+
WHMCS 8.3 and higher includes support for disputes for Stripe and PayPal® transactions at '''Billing > [[Disputes]]'''.
#Select '''Live''', which will then display the WHMCS app.
 
#Click on the app name.
 
#Scroll down to the '''Live Webhooks''' section and click the edit (pencil) icon.
 
#Update the '''Webhook URL''' to the correct address. This will need to end with <tt>/modules/gateways/callback/paypalwebhooks.php</tt>.
 
#Scroll down and click '''Save'''.
 
  
PayPal will now be able to send future webhooks to the new URL.
+
== Troubleshooting ==
  
==Common Problems==
 
 
If a client pays an invoice and a completed payment is deposited into your PayPal account, but not recorded in WHMCS, you can troubleshoot this by navigating to '''Billing > Gateway Logs'''.
 
If a client pays an invoice and a completed payment is deposited into your PayPal account, but not recorded in WHMCS, you can troubleshoot this by navigating to '''Billing > Gateway Logs'''.
 
   
 
   
Line 131: Line 124:
  
 
If the '''currency_code''' value is not amongst [https://developer.paypal.com/docs/api/reference/currency-codes/#paypal-account-payments PayPal API's supported currency list] then the PayPal Basic module can be used as an alternative in conjunction with the [[Payment_Gateways#Setting_Up_Gateway_Modules|Convert to For Processing setting]] to transparently convert the payment amounts into a currency which is supported by PayPal.
 
If the '''currency_code''' value is not amongst [https://developer.paypal.com/docs/api/reference/currency-codes/#paypal-account-payments PayPal API's supported currency list] then the PayPal Basic module can be used as an alternative in conjunction with the [[Payment_Gateways#Setting_Up_Gateway_Modules|Convert to For Processing setting]] to transparently convert the payment amounts into a currency which is supported by PayPal.
 +
 +
{{modules}}

Revision as of 20:15, 31 March 2022

About this Module

We added this PayPal module in WHMCS 7.9. WHMCS also includes a PayPal Basic module.

PayPal Checkout with Smart Payment Buttons gives your buyers a simplified and secure checkout experience. PayPal Checkout presents the most relevant payment types with methods like Pay with Venmo, PayPal Credit, credit card payments, iDEAL, Bancontact, Sofort, and other payment types.

Supported Features

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

No

Adding the PayPal Payment Gateway

To set up the PayPal payment gateway in WHMCS:

  1. Ensure that your WHMCS installation uses an HTTPS-secured connection with a valid SSL certificate. If it does not, this module will not function correctly.
  2. Go to Configuration () > System Settings > Payment Gateways or, prior to WHMCS 8.0, Setup > Products/Services > Payment Gateways.
  3. Choose the Featured Payment Gateways tab.
  4. Click Activate & Configure for PayPal.
  5. When the system prompts you, log in to your existing PayPal account or sign up for a new one.
  6. When the system prompts you, confirm permission for the WHMCS application to access your account.
  7. Click Confirm to continue. API credentials will populate and WHMCS will save them automatically. The page will refresh.
  8. Check Show on Order Form to display this payment method in the Client Area during checkout.
  9. Click Save Changes.

Migrating from PayPal Basic

For help to migrate to the PayPal module from PayPal Basic, see the PayPal Checkout Migration Guide.

Limitations and Restrictions

The following limitations and restrictions apply to PayPal Checkout:

  • Users who choose to use one of the PayPal Checkout express checkout options within the view cart step of the shopping cart workflow will not be asked to select a payment gateway in the checkout step.
  • The option to apply credit during checkout for existing customers who have a credit balance is not displayed during express checkout to avoid conflicts with the pre-authorized amount at PayPal.
  • MarketConnect Upsells will not be displayed after payment has been pre-authorized with PayPal to avoid changes being made to the cart total after authorization of the payment amount with PayPal.
  • Convert to for Processing is not offered in the module configuration. Payments will be made in the client's selected currency.
  • The system will offer clients the subscription option if they are ordering a recurring product on a monthly or annual billing cycle. The modules configuration does not offer an option to force only one-time payments.

Unlinking Your PayPal Account

Do not use this option if there are PayPal subscriptions you wish to keep.

Clicking Unlink PayPal Account will irreversibly remove the link to your PayPal account. Subscription payments will no longer be recorded in WHMCS.

Updating the PayPal Webhook URL

If your WHMCS installation's URL has changed because you moved it, you must update the webhook URL in PayPal. This will allow WHMCS to continue to record transactions.

To update the PayPal webhook URL:

  1. Log in to https://developer.paypal.com/developer/applications.
  2. Select Live, which will then display the WHMCS app.
  3. Click on the app name.
  4. Scroll down to the Live Webhooks section and click the edit (pencil) icon.
  5. Update the Webhook URL to the correct address, ending with /modules/gateways/callback/paypalwebhooks.php.
  6. Click Save.

Checkout

With PayPal Checkout, users can elect to check out using PayPal.

Clicking any Checkout with PayPal will launch a modal-based payment authorization process. Users will log in to their PayPal accounts and confirm their payment before returning to WHMCS to complete the checkout process.

  • When first-time customers return to WHMCS, the registration form will pre-fill the name, email, and billing address.
  • Existing users who have not already authenticated will see the login screen with their email address pre-filled.

The View Cart step of the order process will display the PayPal Checkout options in addition to the default Checkout:

Paypal-checkout-cart-buttons.png

Express Checkout

Express checkout users will not see a payment method choice after authorizing payment by PayPal. Instead, they will see a message indicating that they have pre-approved payment.

Carts that only have One-Time, Biennial, or Triennial Payment items will immediately include Express Checkout buttons. For carts that contain at least one recurring item (on a Monthly or Annual billing cycle), the client can proceed through the standard WHMCS checkout routine and select PayPal as the payment method. Upon placing an order, they will be redirected to PayPal to create a subscription.

Disputes

WHMCS 8.3 and higher includes support for disputes for Stripe and PayPal® transactions at Billing > Disputes.

Troubleshooting

If a client pays an invoice and a completed payment is deposited into your PayPal account, but not recorded in WHMCS, you can troubleshoot this by navigating to Billing > Gateway Logs.

The explanations and resolutions for common problems are listed below:

Signature Verification Failed

Signature Verification Failed indicates a problem in the payment notification anti-spoof verification. When a payment notification is received from PayPal, WHMCS makes an API request to PayPal confirming that the notification originated from PayPal.

Seeing this typically indicates that a subscription renewal payment was made through a different integration app from the one currently linked to your WHMCS installation.

This situation can arise if Unlink PayPal Account on the module configuration was used after the PayPal subscription was originally created. Once the unlink function is used, the subscription payments that pre-date it can no longer be recorded in WHMCS. Such subscriptions will need to be cancelled via the PayPal website. Clients can then create a new subscription under the current integration app linked to your WHMCS installation when their next invoice is due.

An unknown error occurred. Please try again

unknown error occurred will be displayed if data saved by the PayPal payment button is invalid, such as the amount, client's name, email address, postal address, postal code, or country code.

To capture more details, use the Module Debug Log. Examine the logged request and response data. It should become apparent what data is missing or incomplete from the client's profile. For example:

Request:

{"intent":"CAPTURE","purchase_units":[{"description":"Bronze Hosting - Invoice #123",
"amount":{"currency_code":"USD","value":"25.00"},"invoice_id":123}],"payer":{"name":
{"given_name":"WHMCS","surname":"Support"},"email_address":"email@example.com",
"address":{"address_line_1":"123 Test Street","postal_code":"ABC 123","country_code":""}}}

Response:

{"name":"INVALID_REQUEST","message":"Request is not well-formed, syntactically incorrect,
or violates schema.","debug_id":"abc123","details":[{"field":"/payer/address/country_code",
"value":"","location":"body","issue":"INVALID_STRING_LENGTH","description":"
The value of a field is either too short or too long."},

In this case, the Country Code at the end of the request is empty. To correct this, go to Profile for the client and ensure that a country is selected. Then, click Save Changes.

If a Billing Contact is specified, make the change via Contacts instead.

If the currency_code value is not amongst PayPal API's supported currency list then the PayPal Basic module can be used as an alternative in conjunction with the Convert to For Processing setting to transparently convert the payment amounts into a currency which is supported by PayPal.

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