Skip to main content

Configuring PayPal

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

Multi-merchantMulti-currency
yesyes
Payment MethodOne-timeRecurringRefunds
PayPalyesyesyes

Pre-requisites

  • FinDock installed and configured.
  • FinDock WebHub is connected.
  • A source connector is installed and configured.
caution

To be able to configure and use recurring payments in PayPal for FinDock, 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.

Create a PayPal app#

You need to create and configure a PayPal app before you can complete the PayPal for FinDock configuration. Some information from the PayPal app settings needs to be copied to the Paypal for FinDock extension settings. 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 My Apps & Credentials in the left-hand menu.
  3. Toggle the Sandbox or Live (production) button according to the type of org you are configuring and click Create App. paypal_account_new_app-1024x479
  4. Fill in a name for the app and click Create App.
  5. Two values from the app credentials need to be added to the respective PaymentHub-PayPal setting fields in FinDock. paypal_app_clientid_secret-1024x550
    • 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.
  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 (see below).
  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 and copy-paste the Webhook ID of the webhook you just added into the PayPal Webhook Id field of the PayPal settings in FinDock. paypal_app_webhook-1024x429

Configure PayPal for FinDock#

If you are not there already, log in to your PayPal developer account and open the app you configured for the PayPal for FinDock extension. 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 extnnsion 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, Webhook Id: 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.

Testing with the Payment API#

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

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"
}
}