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
Payment MethodOne-timeRecurringRefunds
PayPal

Prerequisites

  • FinDock is installed and configured.
  • WebHub is connected.

ย ย ย 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 PayPal extension

Follow the standard procedure for installing payment processors to add the PayPal payment extension and activate the PayPal payment method.

Check and assign the required permissions. If you are using custom permission set groups, ensure the Nordic permission sets are 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
  • Use separate, 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 FinDock Setup tab.
  2. Go to Payment Processors & Methods.
  3. Under Installed Processors, click the PayPal processor entry.
  4. Click Add account.
  5. 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.
  6. Return to the PayPal App you have created (see previous section).
  7. Scroll down to the bottom of the PayPal app settings page and click Add Webhook.
  8. As the webhook URL, copy-paste the Notification URL from the PayPal 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
  9. Check following event types:
    • Billing subscription cancelled
    • Checkout order approved
    • Payment capture completed
    • Payment capture refunded
  10. Scroll down to the bottom of the event types list and click Save. You are redirected to the app home page.
  11. 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.
  12. Click Save.

Testing with the Payment API

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

ย ย ย 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": "Test",
                "LastName": "Payment",
                "Email": "testpayment@findock.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": "Test",
                "LastName": "Payment",
                "Email": "testpayment@findock.com"

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

Was this page helpful?