Skip to main content

(Classic) How the API works


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.

The Payment API is a REST API used to initiate online payment transactions and/or submit recurring payments to the FinDock app in Salesforce. The API abstracts both Salesforce and FinDock configuration details for specific payment processors and methods, instead providing several informational resources to retrieve environment-specific parameters of a particular implementation.

API v1: From payer to collection

Classic Online Payment Experience

Once the Payer has entered the data in the online form:

  1. Form sends a payment request or PaymentIntent to the FinDock Payment API.
  2. FinDock validates the payment request and creates a Payment with the chosen Payment Service Provider (PSP).
  3. FinDock creates a Messages record in Salesforce through an Authorized user to store the request and handles data creation:
    • Create or update Contacts and/or Account records.
    • Create Installment and/or Recurring records with status Pending

ALL logic with regards to data creation in the Salesforce environment - like Deduplication rules, Process Builders, Apex code and data creation in Source Connectors like Salesforce NPSP- is triggered at this point, and handled before the API continues! Any (Salesforce) errors in this stage will break the API!

  1. FinDock builds a response with the created data.
  2. FinDock sends a response with a RedirectURL to the a FinDock VisualForce page back to the form.*
  3. Form redirects the Payer to the FinDock Redirect page based on the RedirectURL.
  4. FinDock Redirect page redirects Payer to the PSP payment page.
    • Payer either completes or cancels the payment on the PSP Page
    • PSP page redirects Payer to Success or Failure Page provided in the initial payment request.
  5. PSP notifies FinDock VisualForce page through a Salesforce site (with Salesforce Site Guest user of the result of step 7.
  6. FinDock creates a Message record to store the Notification and handles data creation:
    • Creates a Payment record in Salesforce related to the Installment created at step 3.
    • Reduces the amount on the Installment with the amount of the Payment.
    • Updates the status of the Installment to Paid.

If the Payment was not completed the status of the Installment is updated to Failed. If you use a Source Package like NPSP, FinDock updates the data in this package.

* For certain payment methods like direct debit and acceptgiro, steps 5-9 are not always required since the payment will be handled by sending files to and receiving files from your bank. These files can be generated from the data created through the API with Payment Schedules.

Next steps

Migrate from API v1 to API v2

Get started with the Payment API

Create one-off and recurring payments through the API

Read the details in the API Reference v1