Skip to main content

(Classic) Worldpay for FinDock


This article describes Worldpay integration with version 1 of the Payment API. The Classic Online Experience with Payment API version 1 will be decommissioned at the end of 2024. All Payment API integrations should migrate to version 2, the Enhanced Online Experience, by January 2025.

Worldpay is a credit card processing service of FIS Global. This service supports one-time payments as well as recurring bulk credit card transactions.

Payment MethodOne-timeRecurringRefunds
Credit Cardyesyesyes


  • FinDock is installed and configured.
  • A source connector is installed and configured.
  • A Salesforce Site is configured.

Install and activate Worldpay extension

Follow the standard procedure for installing and activating the Worldpay for Findock payment extension.

Set up Worldpay account

Before configuring the Worldpay extension, you need to do some configuration in the Worldpay merchant portal. Your organization should have a corporate account with Worldpay. Use those account credentials here: Worldpay login.

After logging in, you need to select a merchant code and application if your organization has more than one. For further information about the Merchant Admin Interface, please visit the Worldpay support documentation.


Testing of the Worldpay integration requires a test setup with Production Mode.

To set up Worldpay integration with FinDock:

  1. In the left-hand menu, enable Production Mode.
    Activate production mode
  2. Click INTEGRATION in the left-hand menu, and then select the Merchant Channel tab.
    Worldpay Merchant Channel
  3. Under Merchant Channels (test or production, depending on what phase of development you are in), set the http protocol to active, select xml as the content type, and then add the callback URL of your guest site that will use Worldpay in the address field. E.g. https://<domain>/services/apexrest/wpayc/worldpaycallback
  4. Click Save Settings when you are done.
  5. Keep the Merchant Admin Interface open while you configure FinDock. Some information from your Worldpay account is needed for the FinDock settings.

Configure callbacks

To receive the callbacks from Worldpay with regards to transactions, you will need to configure a Salesforce Site to receive these messages. If you haven't already, follow the steps outlined in Configuring a Salesforce Site to configure the base site.

To configure a Salesforce site for Worldpay callbacks:

  1. Open Salesforce Setup and use Quick Search to open Sites.
  2. In the list of sites, click on the Site Label of the site you want to configure.
  3. In the Site Detail page, click the Public Access Settings button.
  4. Click the Enabled Apex Class Access shortcut at the top to jump to the Apex Class settings and click the Edit button for those settings.
  5. From the Available Apex Classes list, select wpayc.WoldPayCallback and click the add button.
    Worldpay apex class for callbacks
  6. Click Save.
  7. Copy the site URL so that you have it available for further Worldpay configuration. Use the URL to ensure an encrypted connection.

Configure Worldpay extension

After you have finished the Worldpay merchant account setup, you can configure the Worldpay extension in FinDock.

To configure the Worldpay extension:

  1. Launch the FinDock app and click Setup.
    Worldpay tile
  2. Click on the PaymentHub-Worldpay tile under Extensions - PSP.
  3. Fill in the settings as described below.
    Worldpay extension setup
    • Endpoint: the Worldpay service endpoint for authorizations and transactions. Enter the endpoint depending on whether you are configuring a sandbox (test) or production org.
      • Test:
      • Production:
    • Merchant Code: enter here your code from the ACCOUNT page of the Worldpay Merchant Admin Interface.
    • Username: enter here the Original XML Username from the ACCOUNT page of the Worldpay Merchant Admin Interface.
    • Base URL: copy and paste the URL of your Salesforce site that is set up for Worldpay callbacks. Make sure to end the url with a slash '/'.
    • Password: enter here the XML Password from the ACCOUNT page of the Worldpay Merchant Admin Interface
  4. When you have entered all the details, click Save.

Create a Worldpay target

When using Worldpay to collect recurring credit card transactions in bulk, you need a Target that allows the bulk upload to be correctly routed to Worldpay.

To create a target for Worldpay:

  1. Launch the FinDock app and click Setup.
  2. Click on the ProcessingHub tile under Extensions - System.
  3. Click on the Targets tab.
  4. Click the Add Target button and on the New Target dialog, give a transparent name that indicates its purpose.
  5. Select the Target type PaymentHub Worldpay and click Save.
    Worldpay target
  6. You are automatically returned to the Targets tab. Click the button to the right of the target you just created and select Settings.
    Opening the settings screen for a target
  7. Fill in the Worldpay target settings as described below.
    Worldpay target settings
    • BATCH_XML_VERSION: change the default version only if you have a specific reason for doing so
    • CURRENCY: Enter your default currency. If your org has multi-currency support enabled, this setting is ignored, and the currency from the installment is used instead.
    • MERCHANT_CODE: your code from the Merchant Admin Interface
    • RECORDS_PER_FILE: unless otherwise decided, leave this at the default value. If the number of transactions exceeds this threshold, FinDock creates multiple files for bulk collection
    • Upload Copy to Chatter: enable if you want the generated bulk payment file that is sent to Worldpay to also be uploaded to Chatter
    • XML_API_ENDPOINT: use the same endpoint here as in the Worldpay extension settings
    • XML_API_USERNAME: use the same username here as in the Worldpay extension settings
    • XML_API_PASSWORD: use the same password here as in the Worldpay extension settings
  8. When you are done filling in the settings, click Save.

Refund handling

Worldpay for FinDock supports both partial and full refunds. The refund handling differs based on the refund type:

  • Full refund: the status of the installment is set to ‘Reversed’ and a negative payment with the full rund amount is created.
  • Partial refund: the status of installment is to ‘Partially paid’ and a negative payment with the amount of the partial refund is created.

Payment API

To test your Worldpay configuration for one-time payments, you can use the following API messages.

If your configuration is correct, you should be able to navigate to the RedirectURL provided in the response and pay the amount specified. When a redirect ends in an unexpected error, the error message is stored in the last status reason of the installment.


In production, recurring credit card tokens are created with an initial lifetime of four years. In testing , tokens are created with a lifetime of seven days.

This following request initiates a one-time credit card transaction with Worldpay.

"FailureURL": "",
"Origin": "API Test",
"Payer": {
"AllowDeduplication": true,
"Contact": {
"Email": "",
"FirstName": "Test",
"LastName": "Tester"
"ContactUpdate": "replace"
"Payment": {
"Amount": "25"
"PaymentMethod": {
"Name": "Creditcard",
"Processor": "PaymentHub-WorldPay"
"SourceConnector": {
"Name": "PaymentHub"
"SuccessURL": ""

The following request initiates a recurring payment.

"FirstName":"Worldpay for FinDock",
"LastName":"Recurring Worldpay",
"Name":"Famylje Douwstra"
"Recurring": {
"Amount": "25",
"Frequency": "Monthly",
"StartDate": "2020-11-01"
"PaymentMethod": {
"Name": "CreditCard",
"Processor": "PaymentHub-WorldPay"
"Settings": {
"SourceConnector": "PaymentHub"