PayPal

PayPal is an alternative payment method around the globe. With PayPal, customers can enjoy a seamless checkout experience, with a choice of fulfilling their payments with their wallet balance or any payment method that is linked to their account, e.g saved cards, bank accounts, e-wallets, etc.. Via PayPal, customers can also use a BNPL payment scheme and install the purchase amount directly to PayPal.

Introduction

PayPal is a global online payment system that allows users to pay for goods and services, send money, and accept payments without revealing their financial details. It's widely accepted around the world and used by millions of businesses and individuals daily.

With Payrails' direct PayPal integration you can accept payments, create billing agreements with PayPal and charge customers for recurring payments, and implement PayPal either using our SDKs or with a server-to-server integration.

Pre-requisites

In order to use Payrails' PayPal integration, you need to grant us permission to make requests on behalf of your PayPal merchant account. In order to initiate this process, please contact your Payrails account representative. We will send you a link to a PayPal onboarding page where you can grant us access to make calls on your behalf. Please note that you have to separately connect your sandbox PayPal account and your production account.

Before you start accepting PayPal payments with Payrails, there are a few requirements you must meet:

  1. Integrate with Payrails using one of our SDKs or our API
  2. Configure a new integration account for PayPal via PayPal
  3. Enable PayPal as a payment option.
  4. Make sure you're sending the PayPal specific meta fields (found under Merchant configurations -> Meta fields on your Payrails dashboard and in the examples below) in your requests.

Ways to integrate

Payrails SDK

The simplest way to use PayPal with Payrails is to use our drop-in in your checkout flow. With this integration type, no additional development work is required to accept payments with PayPal.

Server-to-server integration

To use PayPal by completely managing your own client-side implementation, and using Payrails APIs with a server-to-server integration to process payments with PayPal. With this approach, follow the documentation below to build PayPal into your applications:

Parse PayPal from lookup response

With a server-to-server integration, you can call our lookup payment options endpoint to get available payment options and relevant configurations for each payment method. As the example below, you can see payPal returned as an option of the paymentCompositionOptions. You can use this value later to authorize payments with Payrails as you can see in the next sections.

{
    "name": "lookup",
    "actionId": "0bb6413e-cabb-4074-99e6-9e815c69f25b",
    "executedAt": "2024-05-08T12:33:21.527395295Z",
    "data": {
        "paymentCompositionOptions": [
            {
                "integrationType": "api",
                "paymentMethodCode": "payPal",
                "description": "PayPal"
            }
        ]
    },
    "links": {
        "execution": "http://payrails-api.staging.payrails.io/merchant/workflows/payment-acceptance/executions/83c534ac-13b7-43e6-b04b-f3e8b4eb4424",
        "authorize": {
            "method": "POST",
            "href": "http://payrails-api.staging.payrails.io/merchant/workflows/payment-acceptance/executions/83c534ac-13b7-43e6-b04b-f3e8b4eb4424/authorize"
        }
    }
}

Pass PayPal payment method in request to authorize payment with Payrails

You can then make a request to our authorize a payment endpoint with payPal as the paymentMethodCode. See an example below:

{
  "executionId": "c0fd1c51-e709-47e5-bfd1-5d1c98f7d990",
  "amount": {
    "value": "100",
    "currency": "USD"
  },
  "paymentComposition": [{
    "integrationType": "api",
    "paymentMethodCode": "payPal",
    "amount": {
      "value": "100",
      "currency": "USD"
    }
  }],
  "meta": {
    "order": {
      "lines": [{
        "id": "UUID",
        "name": "Order Name",
        "quantity": 1,
        "unitPrice": {
          "currency": "USD",
          "value": "100"
        }
      }]
    }
  },
  "returnInfo": {
    "success": "https://mysuccessurl.com",
    "error": "https://myerrorurl.com"
  }
}

Supported regions / countries

Region(s)Countries
Americas🇦🇮 Anguilla, 🇦🇬 Antigua and Barbuda, 🇦🇷 Argentina, 🇦🇼 Aruba, 🇧🇸 Bahamas,
🇧🇧 Barbados, 🇧🇿 Belize, 🇧🇲 Bermuda, 🇧🇴 Bolivia, 🇧🇷 Brazil, 🇻🇬 British Virgin Islands,
🇨🇦 Canada, 🇰🇾 Cayman Islands, 🇨🇱 Chile, 🇨🇴 Colombia, 🇨🇷 Costa Rica, 🇩🇲 Dominica,
🇩🇴 Dominican Republic, 🇪🇨 Ecuador, 🇸🇻 El Salvador, 🇫🇰 Falkalnd Islands, 🇬🇱 Greenland,
🇬🇩 Grenada, 🇬🇹 Guatemala, 🇬🇾 Guyana, 🇭🇳 Honduras, 🇯🇲 Jamaica, 🇲🇽 Mexico,
🇲🇸 Montserrat, Netherlands Antilles, 🇳🇮 Nicaragua, 🇵🇦 Panama, 🇵🇾 Paraguay, 🇵🇪 Peru,
🇰🇳 St Kitts & Nevis, 🇱🇨 St Lucia, 🇵🇲 St Pierre & Miquelon, 🇻🇨 St Vincent & Grenadines,
🇸🇷 Suriname, 🇹🇹 Trinidad & Tobago, 🇹🇨 Turks and Caicos, 🇺🇸 US, 🇺🇾 Uruguay, 🇻🇪 Venezuela
Asia Pacific🇦🇲 Armenia, 🇦🇺 Australia, 🇧🇭 Bahrain, 🇧🇹 Bhutan, 🇧🇳 Brunei, 🇰🇭 Cambodia, 🇨🇳 China,
🇨🇰 Cook Islands, 🇫🇯 Fiji, 🇵🇫 French Polynesia, 🇭🇰 Hong Kong, 🇮🇳 India, 🇮🇱 Israel,
🇮🇩 Indonesia, 🇯🇵 Japan, 🇯🇴 Jordan, 🇰🇿 Kazakhstan, 🇰🇮 Kiribati, 🇰🇼 Kuwait, 🇰🇬 Kyrgyzstan,
🇱🇦 Laos, 🇲🇾 Malaysia, 🇲🇻 Maldives, 🇲🇭 Marshall Islands, 🇫🇲 Micronesia, 🇲🇳 Mongolia,
🇳🇷 Nauru, 🇳🇵 Nepal, 🇳🇨 New Caledonia, 🇳🇿 New Zealand, 🇳🇺 Niue, 🇳🇫 Norfolk Islands,
🇴🇲 Oman, 🇵🇼 Palau, 🇵🇬 Papua New Guinea, 🇵🇭 Philippines, 🇵🇳 Pitcairn Islands, 🇶🇦 Qatar,
🇼🇸 Samoa, 🇸🇦 Saudi Arabia, 🇸🇬 Singapore, 🇸🇧 Solomon Islands, 🇰🇷 South Korea,
🇱🇰 Sri Lanka, 🇹🇼 Taiwan, 🇹🇯 Tajikstan, 🇹🇭 Thailand, 🇹🇴 Tonga, 🇹🇲 Turkmenistan, 🇹🇻 Tuvalu,
🇦🇪 UAE, 🇻🇺 Vanuatu, 🇻🇳 Vietnam, 🇼🇫 Wallis & Futuna, 🇾🇪 Yemen
Africa🇩🇿 Algeria, 🇦🇴 Angola, 🇧🇯 Benin, 🇧🇼 Botswana, 🇧🇫 Burkina Faso, 🇧🇮 Burundi, 🇨🇲 Cameroon,
🇨🇻 Cape Verde, 🇹🇩 Chad, 🇰🇲 Comoros, 🇨🇮 Ivory Coast, 🇨🇩 DR Congo, 🇩🇯 Djibouti, 🇪🇬 Egypt,
🇪🇷 Eriteria, 🇪🇹 Ethiopia, 🇬🇦 Gabon, 🇬🇲 Gambia, 🇬🇳 Guinea, 🇬🇼 Guinea-Bissau, 🇰🇪 Kenya,
🇱🇸 Lesotho, 🇲🇬 Madagascar, 🇲🇼 Malawi, 🇲🇱 Mali, 🇲🇷 Mauritania, 🇲🇺 Mauritius, 🇲🇦 Morocco,
🇲🇿 Mozambique, 🇳🇦 Namibia, 🇳🇪 Niger, 🇳🇬 Nigeria, 🇨🇬 Congo, 🇷🇼 Rwanda, 🇸🇭 St Helena,
🇸🇹 Sao Tome and Principe, 🇸🇳 Senegal, 🇸🇨 Seychelles, 🇸🇱 Sierra Leone, 🇸🇴 Somalia,
🇿🇦 South Africa, 🇸🇿 Swaziland, 🇹🇿 Tanzania, 🇹🇬 Togo, 🇹🇳 Tunisia, 🇺🇬 Uganda, 🇿🇲 Zambia,
🇿🇼 Zimbabwe
Europe🇦🇱 Albania, 🇦🇩 Andorra, 🇦🇹 Austria, 🇦🇿 Azerbaijan, 🇧🇾 Belarus, 🇧🇪 Belgium, 🇧🇬 Bulgaria,
🇧🇦 Bosnia and Herzegovina, 🇭🇷 Croatia, 🇨🇾 Cyprus, 🇨🇿 Czech Republic, 🇩🇰 Denmark,
🇪🇪 Estonia, 🇫🇴 Faroe Islands, 🇫🇮 Finland, 🇫🇷 France, 🇬🇪 Georgia, 🇩🇪 Germany, 🇬🇷 Greece,
🇭🇺 Hungary, 🇮🇸 Iceland, 🇮🇪 Ireland, 🇮🇹 Italy, 🇱🇻 Latvia, 🇱🇮 Liechtenstein, 🇱🇹 Lithuania,
🇱🇺 Luxembourg, 🇲🇰 Macedonia, 🇲🇹 Malta, 🇲🇩 Moldova, 🇲🇨 Monaco, 🇲🇪 Montenegro,
🇳🇱 Netherlands, 🇳🇴 Norway, 🇵🇱 Poland, 🇵🇹 Portugal, 🇷🇴 Romania, 🇷🇺 Russia,
🇸🇲 San Marino, 🇷🇸 Serbia, 🇸🇰 Slovakia, 🇸🇮 Slovenia, 🇪🇸 Spain, 🇸🇯 Svalbard & Jan Mayen,
🇸🇪 Sweden, 🇨🇭 Switzerland, 🇺🇦 Ukraine, 🇬🇧 UK, 🇻🇦 Vatican City

Supported workflows and services

WorkflowSupported
Available via Payrails SDK✔️
Available via Payrails API✔️
Delayed / Manual Capture✖️
Instant Capture✔️
Cancel / Void✔️
Refund / Reverse✔️
Save Instruments✔️
Merchant Initiated Transaction (MIT)✔️
InteroperabilityPSP tokens

PayPal billing agreements

  • Fraud SDKs