Set up PayPal
This guide assumes that you already have a PayPal account active and you have the required permissions for creating API Keys. If you do not have this information please read the guide below or contact PayPal customer support.
When working with a real/live PayPal account, the process for generating API credentials for consuming the PayPal API through the REST API method is quite similar to the developer account setup. Here's how you can obtain API credentials for a real/live PayPal account:
Log in to Your PayPal Business Account: Go to the PayPal website (https://www.paypal.com/ ) and log in to your PayPal Business account. If you don't have a business account, you'll need to upgrade your personal account to a business account.
Access the PayPal Developer Dashboard: Once logged in, navigate to the PayPal Developer Dashboard at https://developer.paypal.com/. Use the same PayPal business account credentials to log in.
Create a REST API App: In the PayPal Developer Dashboard, click on the My Apps & Credentials section. Then click on the Create App button to create a new REST API app.
Provide App Information: Fill in the required details for your app, such as the app name and any other necessary information.
Obtain API Credentials (Client ID and Secret): After creating the app, you will receive the API credentials for your live PayPal account:
Client ID: This is a unique identifier for your application. It will be used in API requests to identify your app.
Secret: This is a confidential key used for authentication when making requests to PayPal APIs. Keep this secret, and do not expose it publicly.
Use the API Credentials: In your application's code, you'll need to include the API credentials when making API requests to PayPal. Typically, you'll include the
Client ID
in the request headers for authentication. TheSecret
may be used in combination with other information to generate access tokens required for certain API calls.Switching from Sandbox to Live: When you're ready to switch from the testing phase to the live production environment, make sure to use the live API credentials instead of the sandbox credentials. This ensures that real transactions are processed securely.
Testing the Integration (Optional): If needed, before deploying your application to a live production environment, you can test your integration using the sandbox environment and test accounts provided by PayPal. This helps ensure that your application functions correctly before accepting real payments.
Remember to keep your API credentials secure and do not share them in publicly accessible areas of your code or website. Additionally, be aware of PayPal's security guidelines and best practices to safeguard your customers' information and transactions. Regularly monitor your integration and stay up to date with any changes or updates to PayPal's API documentation.
Enable Vault
PayPal requires the Vault to be enabled in order to store payment tokens.
It is important to make sure that the Vault feature it is marked on PayPal’s panel. In order to do this we need to click on the three dots to the left of our API keys and click on the Edit option.
Once we’re on this page, we scroll down to the Features section and we need to check the Vault option if not already checked by default. This will allow the Customer to process successfully a payment using the paypal button and the payment agreement will be stored in case we need to charge the paypal account again in the future.
Merchant ID
In order to retrieve the Merchant ID we need to access our PayPal’s panel and from the top right corner click on the Profile and search for the Account Settings and click on it.
After that look for the business information from the left menu and click on it in order to display the business information section.
From this view we can copy the PayPal Merchant ID and we’ll need it in order to complete the set up on the Webforce’s panel.
WebForce - PayPal
Accessing WebForce Admin Panel: Open your web browser and go to your WebForce instance's admin panel URL:
https://myinstance.WebForce.com/admin#/login
. Replacemyinstance
with the actual subdomain or domain of your WebForce installation. Log in using your admin credentials.Navigating to Settings: Once logged in, you should be in the WebForce admin dashboard. Look for the navigation menu on the left side of the screen. Click on the Settings option to access the settings panel.
Accessing Gateways: In the settings panel, locate the Gateways option. Click on it to view the available payment gateways.
Adding a New Gateway: On the gateways page, you'll see a list of existing gateways. To add a new one, click on the + (plus) button. This will open the catalog of gateways.
Selecting PayPal Gateway: In the catalog of gateways, look for the PayPal card, which should be labeled as "PayPal." Click on the Configure button under the PayPal card. This will open the configuration form for the PayPal gateway.
Enter API Credentials: In the configuration form for PayPal, you will see input fields for the
Client ID
andSecret Key
. Enter the respective API credentials that you obtained from your PayPal business account in their corresponding input fields.Merchant ID: A required field is also the merchant ID that we fetched from the PayPal panel; we’ll need to paste it on the Merchant ID field.
Enabling Selling Channels (Admin/Invoice, Funnels, and Shop): Since the available selling channels in your WebForce instance are "Admin/Invoice," "Funnels," and "Shop," make sure these channels are enabled in the PayPal configuration form. Select the checkboxes or toggle switches to enable the desired selling channels.
Enabling the Gateway: Look for an option to enable the gateway. It might be a toggle switch or a checkbox. Make sure to enable the PayPal gateway.
Saving the Configuration: After entering the API credentials, enabling the desired selling channels, and enabling the gateway, scroll down to find the Save or Save Changes button. Click on it to save the PayPal gateway configuration.
Congratulations! You have successfully integrated PayPal as a payment gateway in your WebForce instance, with the available selling channels "Admin/Invoice," "Funnels," and "Shop." Customers will now be able to use PayPal for making payments through these channels on your website or application. Remember to thoroughly test the payment process to ensure everything is working as expected before going live.