How to integrate PayPal payment gateway on your website

How to integrate PayPal payment gateway on your website

The conversion of any type of online business depends on the correct choice of a payment provider. This is especially acute in the face of growing competition in the field of electronic commerce, where any advantage can be decisive. In addition to the ability to pay for goods convenient for customers, the merchant can configure the acceptance of payments directly on his website, without forwarding to external resources.

One of the most widely used payment processing services is PayPal.

PayPal has been providing secure payments worldwide for many years. For merchants, the service offers a quick and easy integration process that does not require significant technical skills.

Consider the main points that will help to make a quick installation of the payment system.

Features of installing PayPal payment gateway


  • High-speed data transfer;
  • high level of security;
  • PayPal makes payments for more than 200 million customers from more than 200 countries and has multicurrency support;
  • the ability to pay both by credit card and directly from PayPal account;
  • PayPal database. In the community you can always find the answer to any question related to the system;
  • One of the advantages is also the trust of users who choose this product.


  • Although PayPal has a wide range of API settings, however, this makes it difficult to find the most optimal for a particular business;
  • lack of currency conversion;
  • Sandbox service imposes certain restrictions and reduces the speed of work. Also, periodically there is a problem with receiving IPN notifications.

What payment methods does PayPal support?

  1. Mass payments. Used to send money to a group of people up to 5000 people at a time.
  2. Recurring payments. A convenient method for paying for subscription services. To implement this feature, the company offers several customizable API options.
  3. Direct payments. Payment service using the API that is used to accept credit card payments from customers who do not have a PayPal account. This method allows you to integrate the transaction process into your website. Direct Payment is quite easy to use, which increases customer loyalty.
  4. Express payment. A quick opportunity to bring a payout. The method is available for those who have a personal PayPal account.


At the initial stage, you must have a registered PayPal account with the data provided about the product or service of the company to confirm the legality.

After completing the data entry, you will be provided with an identifier key that must be saved to recognize your application and settings for it.

To get the API, go to the “My Apps & Credentials” section and select “Create App”. Next, select the “REST API”. This model is the most popular and will be used as an example.

In the Credentials tab of the Sandbox API, the user can find all the necessary settings.

To create a test account in the Sandbox, go to the “Accounts” tab. If you need to continue working in the Sandbox, configure SANDBOX APP SETTINGS and SANDBOX WEBHOOKS.

Go to or depending on whether you are using a test account or the main one. Go to profile settings > my selling tools and fill in the missing information

API Functional Overview

To send requests and receive responses, the company uses two formats:

  • SOAP Object-oriented method;
  • NVP Name-value-pair.

Each of these methods has several advantages, so you can choose what is better for you.

The easiest way to make a payment is to use the standard API. This method allows you to pay by a card or through your PayPal account.

The process of express checkout:

  • The SDK sends a request to the API to receive a token from PayPal and sends transaction details.
  • If a token is provided, the client is redirected to PayPal to select a payment method and delivery address.
  • A buyer approves or declines payment.
  • Next, PayPal redirects the customer back to the store website.
  • The API requests transaction information.
  • The customer completes the order.
  • The API requests payment status information.
  • PayPal makes an operation. The merchant can manually check the status through the transaction history in his account.

The Payflow API SDK is used for credit card payments.

There are several usage methods:

Payflow Pro is an iframe form that is used to enter card data and is located on the PayPal side. Merchant’s website is not involved in the data entry process. This allows for better security, although it introduces some difficulties in setting the form.

Payflow – uses a form that is on the side of the merchant. This method is faster, HTTPS protocol transmits all the data on time.

Mass payments. Used to merge several transactions into one. This API requires a PayPal email.

The process of checkout:

  • PayPal API generates a list of transactions and sends it to PayPal.
  • Payment is being processed until IPN notifications of all sub-operations are received.
  • If for any reason your server cannot get an IPN, you need to manually log in to your PayPal account and resend it.

The final thoughts

Along with the many features that PayPal provides, the system also has many working nuances. All this may require serious work skills and additional time to test transactions.

We also recommend that you familiarize yourself with the documentation before starting development.