Skip to main content

Configuring PayPal

PayPal for FinDock is a payment extension for PayPal, the well-known global Payment Service Provider (PSP). The FinDock payment extension supports one-time and recurring payments in multiple currencies.

Multi-merchantMulti-currency
yesyes
Payment MethodOne-timeRecurringRefunds
PayPalyesyesyes

Pre-requisites

  • FinDock installed and fully configured
  • Successful FinDock WebHub connection
Extra PayPal requirement

For recurring payments, you need to have Reference Transactions enabled in your PayPal account. You may need to contact PayPal Customer Service to get this feature enabled in your account.

Install and activate PayPal for FinDock

Follow the standard procedure for installing and activating the PayPal for FinDock payment extension.

Check and assign the required permissions for FinDock and PayPal features. Ensure all package-specific permission sets are correctly assigned.

Create a PayPal app

You need to create and configure a PayPal app for the PayPal for FinDock configuration. Some information from the PayPal app settings needs to be copied to the PayPal for FinDock settings.

When working with PayPal apps:

  • Use a dedicated app for each PayPal target (merchant account) in FinDock for multi-merchant setups
  • Used sperate, dedicated apps for testing (PayPal sandbox app) and production (PayPal live app).
  • Use a only one app type, sandbox OR live, in a single org

You can complete the PayPal app configuration first and then move onto the FinDock configuration, or do them in parallel.

To create a PayPal app:

  1. Sign up or log in to https://developer.paypal.com.
  2. Click the Apps & Credentials tab.
  3. Toggle the Sandbox or Live (production) button according to the type of org you are configuring and click Create App.
    PayPal dashboard_new_app
  4. In the pop-up, enter a name for the app, select Merchant type, and click Create App.
  5. Two values from the app credentials need to be added to the respective PaymentHub-PayPal setting fields in FinDock.
    • Copy-paste Client ID into the PayPal API Client Id field in FinDock.
    • Click Show to reveal your app secret and copy-paste this value into the PayPal API Secret field in FinDock. PayPal_app_Client ID and_secret

Configure PayPal for FinDock

A PayPal app is tied to one PayPal target in FinDock through the PayPal for FinDock extension. Multi-merchant PayPal accounts use multiple apps, each tied to a target configured in FinDock.

If you are not there already, log in to your PayPal account and open the app you want to use with FinDock. You need to copy some information from the app settings to the PayPal for FinDock settings.

To configure PayPal for FinDock:

  1. Launch the FinDock app and click the Setup tab.
  2. Go to the Remote Site Settings tab and activate one of the PayPal endpoints.
    • PayPalProductionEndpoint: activate this endpoint if you are configuring a production org.
    • PayPalTestEndpoint: activate this endpoint if you are configuring a sandbox org for testing.
  3. Click the FinDock Setup tab to go back to the home page and then click on the PaymentHub-PayPal tile under the section Extensions - PSP.
    PayPal extension settings in FinDock
  4. Fill in the PayPal settings from your PayPal app and click Save.
    • Notification URL: the URL is automatically filled by the WebHub Notification Gateway.
    • Client Id, Secret: copy-paste these from your PayPal app settings (see above).
    • Default Billing Agreement Description: for details on PayPal billing agreements, see the PayPal developer docs.
    • isTest: activate if you are configuring a sandbox org for testing.
  5. Return to the PayPal App you have created (see previous settings).
  6. Scroll down to the bottom of the PayPal app settings page and click Add Webhook.
  7. As the webhook URL, copy-paste the Notification URL from the PayPal for FinDock extension settings. Make sure you have saved the FinDock settings at least once for the URL to be correct. Example: https://notifications.findock.com/1xxxxxxxx2/PaymentHub-PayPal
  8. Check following event types:
    • Billing subscription cancelled
    • Checkout order approved
    • Payment capture completed
    • Payment capture refunded
  9. Scroll down to the bottom of the event types list and click Save. You are redirected to the app home page.
  10. Scroll down to the webhooks section, copy the Webhook ID of the webhook you just added and paste it into the PayPal Webhook Id field of the PayPal settings in FinDock.
  11. Click Save.

Testing with the Payment API

You can use the following example messages to test if the PayPal configuration is working as expected.

info

When testing PayPal through the Payment API, Giving Pages or otherwise, please carefully follow the PayPal guidance. Test payers, for example, need to have test accounts themselves to be able to complete a test payment.

One-time payment

{
"SuccessURL": "https://www.example.com/success",
"FailureURL": "https://www.example.com/error",
"WebhookURL" : "https://webhook.site/365d03f8-977f-4fc3-9b01-256cf51e71bb",
"Payer": {
"Contact": {
"SalesforceFields": {
"FirstName": "Eric",
"LastName": "Johnson",
"Email": "eric@johnson.com"

}
}
},
"OneTime": {
"Amount": "36"
},
"PaymentMethod": {
"Processor": "PaymentHub-PayPal",
"Name": "PayPal"
},
"Settings": {
"SourceConnector": "PaymentHub"
}
}

Recurring payment

{
"SuccessURL": "https://www.example.com/success",
"FailureURL": "https://www.example.com/error",
"WebhookURL" : "https://webhook.site/365d03f8-977f-4fc3-9b01-256cf51e71bb",
"Payer": {
"Contact": {
"SalesforceFields": {
"FirstName": "Eric",
"LastName": "Johnson",
"Email": "eric@johnson.com"

}
}
},
"Recurring": {
"Amount": "25",
"Frequency": "Monthly",
"StartDate": "2020-12-05"
},
"PaymentMethod": {
"Processor": "PaymentHub-PayPal",
"Name": "PayPal"
},
"Settings": {
"SourceConnector": "PaymentHub"
}
}