How To Set Up PayPal Express Checkout in Magento 2

how to set up paypal express checkout in magento 2

Nowadays, PayPal is considered the most preferred online payment around the world for its convenience and safety. In Magento 2, your store can allow the customers to make payments through debit, credit cards, and PayPal as well. There is an array of PayPal payment options; however, in this Magento 2 tutorial, we will give you detailed instructions on how to set up the PayPal Express Checkout only.

What Is Paypal Express Checkout In Magento 2?

paypal express checkout in magento

This PayPal Express Checkout payment method in Magento 2 might contribute to enhancing your sales since it allows the buyers to pay by either their credit card or PayPal account.

Below is the checkout flow using the PayPal Express Checkout in Magento 2 stores:

  1. The users click the “Check out with PayPal” button (on the product pages/ cart pages/ shopping cart pages)

2. They are redirected to the site of PayPal

3. They need to log in to their PayPal account to pay for the orders

4. After completing the transaction, the users are sent back to the Magento store

5. They will place the order on the Magento site

6. The order information will be transferred via PayPal APIs to PayPal for settling the transaction.

How To Set Up Paypal Express Checkout In Magento 2?

Step 1: Create a PayPal Business Account

  • Visit PayPal Business Signup Page: Go to the PayPal Business website by entering in your web browser’s address bar.
  • Choose Business Account: On the PayPal Business landing page, click on the “Sign Up” or “Create an Account” button. Select the option to create a Business Account, as this is the type of account you need to accept payments for your online store.

(Notes: You need to have a PayPal Business account instead of a Personal PayPal account. Your customers can use their Personal account to pay for their orders on your site, but you must have a Business account to accept online payments via PayPal).

  • Enter required information in the sequel step such as business information or email
  • Verify Your Account: PayPal may require you to verify your identity and business information. This could involve providing additional documents, such as your business license, tax identification number, or other relevant documentation.

Step 2: Set up your merchant account on the PayPal website

  • Log in to your PayPal business account: Go to and fill in your PayPal account
paypal express checkout setup magento 2

  • Enable Secure Token: Go to Service Settings > Hosted Checkout Pages > Set Up; and then, set AVS and CSC to No, and Enable Secure Token to Yes > Save the settings.
  • Set up an additional user

( Note: To integrate PayPal Express Checkout, you’ll need to obtain API credentials from your PayPal account.)

  • Obtain PayPal API Credentials: Under the Integrate PayPal section, click on API credentials. Generate or view your API credentials: Username, Password, Signature, and Client ID & Secret for REST API.
  • Set Enable this Solution to Yes

Save all configs to complete and move to the next step.

Step 3: Open PayPal Checkout Configuration in Magento backend

  • Open configuration: Go to Admin panel, navigate to STORES, click on Configuration (under Settings)

(Admin panel => STORES => Configuration)

  • Fill information: On the left menu, expand the SALES section and choose Payment methods in the dropdown.
magento 2 paypal express checkout

Next, choose the country where your business is currently located.

Then, click on Configure in PayPal Express Checkout to start the configuration.

configure paypal express magento 2

Step 4: Fill in Required Settings

  • Enter the email address that was specified in your PayPal merchant account.
  • Set API Authentication Methods to API Signature/ API Certificate.
  • Enter your API Username, API Password and API Signature. The fastest way is to click on Get Credentials from PayPal to connect with your PayPal account and get this information.
  • In case you use credentials from Sandbox, set Sandbox mode to Yes.
  • If you utilize a proxy server to connect your Magento store with PayPal then set APU Uses Proxy to Yes. After that, enter Proxy Host and Port.
  • Choose Yes for Enable this Solution.
  • If your store allows PayPal Credit for your customers, set Enable PayPal Credit to Yes.
set up paypal checkout magento 2

Step 5: Fill in Basic Settings

  • Set the title for payment method (you can leave it as default).
  • Set order for PayPal Payment Standard besides other payment methods. (For example, if you set order to 0, this method will appear first).
  • Choose a Payment Action among Authorization/ Sale/ Order. To fully understand the differences among these 3 types, please click here to read PayPal policies.
magento 2 paypal checkout configuration

If you choose Order for Payment Action, it will appear 3 more fields to complete. Then, you have to enter the number of days during which the primary authorization/ order is valid and the maximum number of authorization for a single order.

paypal express checkout magento 2

Step 6: Fill in Advanced Settings

  • Moving to the Advanced Settings
  • Set Display on Shopping Cart to Yes.
  • Choose all/ several countries where this payment method is accepted.
  • Set Debug Mode to “Yes” to write communications with the payment system into the log
    file. The log file for PayPal Payments Advanced is payments_payflow_advanced.log.
  • Set Enable SSL Verification to Yes to enable host authenticity verification.
  • Set Transfer Cart Line Items to Yes to show order summary by line item from the PayPal website.
  • If you want to display up to 10 shipping options in the order summary, set Transfer Shipping Options to Yes.
  • Set Shortcut Buttons Flavor to Dynamic – show an image that can be updated from PayPal or Static – show a fixed image.
  • Set Enable PayPal Guest Checkout to Yes in order to allow customers to make payments with this PayPal even when they don’t have a PayPal account.
  • Set Require Customer’s Billing Address if you find it necessary and vice versa.
  • Set Billing Agreement Signup to Auto/ Ask Customer/ Never to determine whether the user can sign a billing agreement with your store in PayPal when there is no active billing agreement available in the customer account.
magento paypal express checkout

  • Save all config to complete.

Step 7: Finish with the Smart Button Settings

You can customize the PayPal smart button’s size, color, shape, as well as decide where to show it – on the product pages, shopping cart pages, mini cart pages, or checkout page.

Common Issues when Set Up PayPal Express Checkout In Magento 2

Setting up PayPal Express Checkout in Magento 2 can sometimes come with challenges or common issues that merchants might encounter. Here’s a list of common issues along with some troubleshooting tips to help you address them:

  • Error: API Credentials Invalid

Issue: This error occurs when the API credentials (Username, Password, Signature) entered in Magento 2’s configuration are incorrect or don’t match the ones associated with your PayPal Business Account.

Solution: Double-check the API credentials you’ve entered. Go to your PayPal account and ensure you’re using the correct API credentials for the appropriate environment (sandbox or live). Update the credentials in Magento 2’s configuration if needed.

  • Payment Action Configuration Mismatch

Explanation: This error arises when the payment action settings in your Magento 2 configuration do not match the settings in your PayPal account. For instance, you might set Magento to “Sale” (authorize and capture) while PayPal is configured differently.

Solution: Align the payment action settings between Magento 2 and PayPal. If you want to capture payments immediately, make sure both platforms are set accordingly. Consistency is key to avoiding conflicts.

  • IPN Notifications Not Received

Explanation: Instant Payment Notification (IPN) allows PayPal to notify your Magento 2 store about transaction updates. If your store isn’t receiving IPN notifications, transaction statuses might not update correctly.

Solution: Ensure that IPN settings are properly configured in your PayPal account. Double-check the IPN URL provided by Magento 2 in your PayPal settings. Also, verify that your server or firewall isn’t blocking incoming IPN requests.

  • Currency Mismatch

Explanation: When the currencies allowed by PayPal and those configured in your Magento 2 store don’t match, customers may encounter errors during checkout.

Solution: Check and align the currencies supported by PayPal and those configured in Magento 2. Make sure the currencies are compatible to avoid currency conversion issues.

  • SSL Certificate Missing

Explanation: Without a valid SSL certificate (HTTPS), your Magento 2 store might have trouble communicating securely with PayPal, leading to errors during payment processing.

Solution: Install an SSL certificate on your server to enable HTTPS for your store. This not only ensures secure data transmission but also prevents browser warnings that could deter customers.

Wrapping Up

We have shown you how to set up PayPal Express Checkout in Magento 2. If you have any problems when following this tutorial, be free to ask us by leaving a comment below. Or, in urgent cases, you should contact PayPal team directly (via messages or calls) to assist with your problems. PayPal supports us on both online payment issues and to sign up for its services.

See you in the next tutorials!

Read More of our Magento “How To” Series:

Magento 2 Demo (The Latest Version) – Provided Sample Data & Admin Access

Leave a Reply

Your email address will not be published. Required fields are marked *