Enable card and bank payments in one place

Powerful payment gateway

Trusted choice for secure online transactions.

Integrating PayPal Payment Gateway with Salesforce using ChargeOn

Salesforce supports custom integration with PayPal. Implementing this custom integration necessitates the use of Apex, tailored Lightning Web Components (LWC), and a reliance on the payment gateway for tokenization.

Nonetheless, this custom integration has several integration gaps.

Table of Contents

PayPal Salesforce integration challenges

  • The manual Salesforce PayPal integration requires custom APIs and manual setup.
  • It leaves data loosely integrated between both platforms.
  • It creates vendor dependency.
  • Salesforce and PayPal use different field names and data structures, therefore requiring meticulous mapping.
  • Issues like payment duplications, restricted options, and manual reconciliations slow processes and frustrate your customers.
  • You will find your payment data in PayPal, while customer lifecycle and sales data are present in Salesforce. This creates data silos.
  • Your finance and sales teams often rely on separate reports and manual reconciliation.
  • Your teams have to switch platforms between Salesforce and the PayPal gateway dashboard.

With ChargeOn, all these challenges are eliminated!

How does ChargeOn resolve PayPal Salesforce integration challenges?

ChargeOn is a 100% Salesforce native payment processor and orchestration tool. It offers a centralized view of all your payments in Salesforce, bringing data from PayPal and Salesforce together.

ChargeOn provides prebuilt flows for one-time and recurring payments, reminders, retries, and payment links. Additionally, it offers tokenization, PCI DSS-compliant processing, and secure data flows with a failover backup mechanism.

Step-by-step Salesforce and PayPal integration using ChargeOn

Before you move on with the steps, ensure that you have followed the prerequisite steps

This guide helps you in:

  • Assigning appropriate permissions to relevant users
  • Configure and set up ChargeOn

Note: Screenshots and details may differ based on your gateway version.

Access to an active PayPal gateway account

  • Go to Paypal and Click on Get Started or Sign up with G Suite.
  • Create the Account.
  • Step - Create the Account Image

Technical steps start here:

Step 1. Log in to the Portal

  • Go to the PayPal Login Page
  • Sign up for a new account creation
    OR
  • Log in using your credentials

Step 2. Open Account Settings

  • From the top navigation bar, click Sign up
  • Choose the account that needs to be created
  • Step - Choose the acccount need to create Image
  • Enter all the information
  • Step - Enter all the information Image
Important: The same PayPal Business Account can be used for both testing and real payment processing. PayPal provides an option to switch between Sandbox (testing) mode and Live (production) mode as required.

It is strongly recommended that all integrations and payment scenarios be thoroughly tested using Sandbox mode along with a Salesforce sandbox environment before enabling Live mode for actual customer transactions.

To switch from Sandbox to Live:

  • Login into PayPal
  • Click on the toggle button between Sandbox/Live in the top left corner
  • Step - Toggle between Sandbox/Live Image

Step 3. Get the Secret Key/ Credentials

  • Login into PayPal Account
  • Click on the Apps and Credentials button in the left corner
  • Click on the Default Application under App name
  • Copy the Client ID and Secret key 1 provided under the tab
  • Step - Copy Client ID & Secret Key
  • When switching your account to Live mode, a new application must be created to generate production credentials

Create your PayPal gateway record in Salesforce

To create a PayPal gateway record in Salesforce, you need to configure the gateway in ChargeOn.
Step 1: Open ChargeOn App
  • Click on the App Launcher (9-dot icon)
  • Search for ChargeOn.
  • Click to open the ChargeOn application.
Step 2: Navigate to Payment Gateway
  • From the ChargeOn app navigation bar, open the Payment Gateway tab.
  • Click New to create a new Payment Gateway record.
Step - Click new to create a new payment gateway record image
Step 3: Select gateway
  • In Select Gateway, choose PayPal from the dropdown.
Step - Choose Paypal from the dropdown
Step 4: Select payment methods
  • Under Select Payment Method, move the following options from Available to Selected:
    • Instant
    • Schedule

These define how payments can be processed using this gateway.

Step 5: Select payment types
  • Under Select Payment Types, move the following options from Available to Selected:
    • PayPal

This enables payment links for PayPal.

Important: PayPal has its own payment methods; therefore, in ChargeOn, you will find its default payment method, which is Payment Links.
Step - Select Payment Method & Type image
Step 6: Enter basic gateway details
  • Fill in the required fields as follows:
    • Payment Gateway Name
    • Gateway
    • Default Currency: USD
  • The supported currencies: Refer to this document
  • Base URI: https://api-m.sandbox.paypal.com/v2/
  • Minimum Charge: $1
Step - Enter basic gateway details Image
Note:
  • Use the https://api-m.sandbox.paypal.com/v2/ URL for sandbox/testing.
  • Replace with the production URL when configuring live payments.

Step 7: Add gateway credentials (refer to the previous image)

  • In the Gateway Credentials section, add the following key-value pairs:
    • Enter the Client Secret
    • Enter the Client ID

Step 8: Review all details carefully and click Save

Step - Review all details carefully and click Save Image

The PayPal payment gateway is now configured and ready for use in ChargeOn.

Test your transactions in a Salesforce Sandbox

You can test your integration in multiple ways.

We are sharing one of the simplest ways to test the same using PayPal payments.

PayPal Payment allows you to make payments using a payment link via Credit card or using your bank account number.

  • Selects the payment gateway to start the payment process.
  • Once the gateway is chosen, select PayPal Payment as the payment method.
Step - Test your transactions in a Salesforce Sandbox
Step - Test your transactions in a Salesforce Sandbox
  • Choose the payment mode: instant, schedule payment.
  • Enter basic personal details, such as Payee Name, Email, and Payable Amount.
  • Click the Charge button to submit the payment.
The system securely sends the Payment URL to the customer's email. The customer securely processes the payment using a credit card and bank account.
A confirmation email is automatically sent to the customer, and the payment details are saved in Salesforce for tracking and records.
Step - Test your transactions in a Salesforce Sandbox

Set up the remote site settings

  • Click the Gear icon in the top-right corner and select Setup
  • In the Quick Find search box, search for and open Remote Site Settings
  • Enter the details and confirm that the Active checkbox is selected:
    • Enter the Remote Site Name
    • Enter the Remote Site URL
  • If the Active checkbox is not selected:
    • Click Edit
    • Select the Active checkbox
    • Click Save to apply the changes

Prepare to go live in production

Follow the steps below to create a PayPal application and obtain the required Live credentials:

  • Sign in to your PayPal Business Account
  • From the top-right corner, open the Developer Dashboard
  • Confirm that the account environment is set to Live mode
  • Navigate to the Apps & Credentials section
  • Click Create App

Provide the following details while creating the application:

  • App Name: Enter a meaningful name for the application (for example, Live Application).
  • Type: Select the Merchant option
  • Live Account: Choose your associated PayPal business account
  • Copy both IDs: Client ID, Secret ID
  • Add these credentials to ChargeOn, and now your data is ready for the live environment

Post deployment, perform controlled production testing to validate end-to-end payment processing before enabling the solution for live users.

With this, your PayPal integration with Salesforce is successful using ChargeOn. 

In case you encounter any challenges or errors during this setup, please reach out to our ChargeOn experts, who will assist you. 

Refer to our Salesforce Multi-Gateway Setup Guide for integrating multiple payment gateways and optimizing your Salesforce payment integration. This eliminates the dependency on a single vendor.

Apart from PayPal, ChargeOn supports other widely used global payment gateways, including:

Download our ChargeOn prerequisite guide

Fill this form to get access to our E-guide!