openapi: 3.2.0
info:
  title: FinDock Payment API
  summary: API reference specification. Last updated on 2026-06-22.
  description: >
    The FinDock Payment API is a REST API for handling one-time and recurring
    payments. The API also

    provides informational endpoints you can use to build dynamic front-end
    applications that are

    not dependent on a specific Salesforce of FinDock configuration.


    Alongside primitive data types such as `string`, the Payment API uses data
    types that might be unfamiliar

    to you if you have not worked with Salesforce. These data types are
    Salesforce objects, record types

    and fields.


    ## Objects, record types and fields


    Salesforce objects (sObjects) are stored as records in the Salesforce
    database. These records are persistent representations of data.

    Some API resources accept, or even require, sObjects. The Payer block, for
    example, requires sObjects such as Contact and Account.

    The API allows you to define these objects in payloads. FinDock sObjects
    like Inbound Report can be included as well,

    but they require you to specify the object fields as Salesforce fields.


    **Record types** let Salesforce administrators offer specific business
    processes, picklist values, and page layouts to different users.

    Organizations can, for example, differentiate between `Account` object
    records by assigning them an `Organization` or `Household` record type.

    This facilitates the application of different types of page layouts or
    possible field values based on what record type an `Account` is.


    **Fields** are defined at the object level in Salesforce. Next to the
    out-of-the-box fields from Salesforce, custom fields can be added to
    objects. 

    Use the Object Manager in Salesforce Setup to see available fields.
    Implementations of Salesforce can use different fields for a value like
    `email`.


    Custom fields for *standard Salesforce objects* like `Contact` and `Account`
    are passed with "__c" at the end of the field name.

    In the example below, you see the standard fields `FirstName` and `LastName`
    and a custom field `TwitterHandle` for the Contact object.


    ```json

    {
      "Payer":{
        "Contact":{
          "SalesforceFields":{
                "FirstName":"Test",
                "LastName":"Payer",
                "TwitterHandle__c": "@TestPayerFamily"
            }
        }
      }
    }

    ```


    Custom fields for **custom FinDock objects** like `Installment` and
    `Recurring Payment` can also be passed in a `SalesforceFields` object.
    `SalesforceFields`

    passed in the `OneTime` object are copied to the `Installment` record in
    Salesforce and `SalesforceFields` passed in the `Recurring` object are
    copied to the

    `Recurring` object in Salesforce. To which `Recurring` object the values are
    stored depends on the FinDock configuration.


    ```json
        {
          "OneTime":{
            "Amount": 10.0,
            "SalesforceFields": {
              "Sales_Invoice__c": "a506E0000009TfL"
            }
          }
        }
        ```

    ## Working with payer details


    Salesforce provides two objects to define the Payer:
      - Account: usually an organization
      - Contact: an individual

    Added to that simple split is [Person
    Account](https://help.salesforce.com/s/articleView?id=sf.account_person.htm&type=5),
    which

    stores information about individual people by combining certain Account and
    Contact fields into a single record. It is not its

    own object, but can be stored as an Account with a specific record type (see
    below).


    Some features of Salesforce - like Fundraising used in NonProfit Cloud (NPC)
    - *require* Person Account. The payer details are a Person Account

    record rather than a Contact. Make sure to always check with your Salesforce
    admin whether they are enabled and used.


    To send Person Account details to the Payment API, use an Account object
    with a `RecordTypeName` (API name) of the type Person Account.

    By default the API name is `PersonAccount`, but there can be customized or
    the org (Salesforce environment may have multiple

    Person Account record types. Always consult your Salesforce admin regarding
    record types.


    Whether an Account or Contact record, you always need to take into
    consideration how the payer is deduplicated. Every organization 

    has [configured deduplication
    rules](https://help.salesforce.com/s/articleView?id=sales.managing_duplicates_overview.htm&type=5)

    that define the information the payment intent message needs to include for
    deduplication, bearing in mind that the more data points you 

    have, the more effective deduplication is.


    ```json

    {
      "Account":{
        "RecordTypeName": "person-account-record-type",
            "SalesforceFields":{
              "Name":"Test Payer",
              "BillingStreet":"Any Street",
              "BillingCity":"Any City",
              "BillingPostalCode":"00000"
            }
          }
    }

    ```


    For Person Accounts the following exceptions for (custom) field notations
    apply:

    - Standard Account fields can be passed as regular fields:
    `"BillingStreet":"Any Street"`.

    - Custom Account fields can be passed with the regular `__c` suffix:
    `"Custom_Street__c":"Any Street"`.

    - Standard Contact fields need to be prefixed with `Person`, with the
    exception of FirstName, LastName, Salutation which are passed as regular
    fields: `"PersonEmail" : "test@findock.com"`.

    - Custom Contact fields need to be suffixed with `__pc`:
    `"Custom_email__pc":"test@findock.com"`


    ```json

    {
      "Account":{
        "RecordTypeName": "person-account-record-type",
        "SalesforceFields":{
          "FirstName": "John",
          "LastName": "Payer",
          "PersonEmail": "test@findock.com",
          "BillingStreet": "Any Street",
          "Custom_account_field__c": "Apartment Name",
          "Custom_contact_field__pc": "Middle Name"
        }
      }
    }

    ```


    For the FinDock for Fundraising source connector used with NonProfit Cloud
    (NPC), for example, the following exception applies:

    Since the "Recurring" object (Gift Commitment) is split in two objects (Gift
    Commitment & Gift Commitment Schedule), a prefix `GiftCommitment` is
    required to set SalesforceFields on this object.

    Fields without prefix are assumed to be set on the Gift Commitment Schedule
    object. Example: `GiftCommitment.GiftVehicle`.


    You can check which Source Connectors are available by performing a GET
    operation on the [Source Connector](/api/payment-api-v2/source-connectors)
    endpoint.


    ## Authentication


    Authentication is accomplished through an [Oauth2.0 authorization
    flow](https://help.salesforce.com/articleView?id=remoteaccess_oauth_web_server_flow.htm&type=5).
    Each Salesforce environment requires

    its own token. A [refresh
    token](https://help.salesforce.com/articleView?id=remoteaccess_oauth_flows.htm&type=5)
    can be used to acquire a new access token if the current token has expired.

    Read more on how to authenticate to Salesforce in the [Salesforce developer
    guide](https://help.salesforce.com/articleView?id=remoteaccess_oauth_flows.htm&type=5).

    Both `client_id` and `client_secret` can be acquired from the Salesforce
    'Setup' from a 'Connected App'.

    - The `Authorization` token can be passed as a Bearer token in the request
    Header.

    - To Acquire a new `Authorization` token with the returned `Refresh` token,
    please make sure to pass the right `grant_type`, `client_id`,
    `client_secret` and `refresh_token` as specified in the

    Salesforce documentation referenced above. To get up and running quickly,
    use the (unofficial-but-provided-by) [Salesforce Postman
    Collection](https://github.com/scolladon/postman-salesforce-apis),

    as explained in this
    [blog](https://developer.salesforce.com/blogs/2020/03/explore-the-salesforce-apis-with-a-postman-collection.html)
    and look for the 'auth' folder.


    ## Error and response codes


    IF the API is not called successfully, you receive a HTTP Status Code `4xx`
    or `500`. A `422` code is returned when the message was well-formed, but
    could not be processed because of, for instance, wrong data. 

    In the response you find additional information on how to prevent or handle
    the error through an array of `Errors` with an `error_code` and
    `error_message`, like in the following example.


    ```json

    {
      "Errors": [
        {
          "error_message": "Amount can't be 0 or negative",
          "error_code": "200"
        }
      ]
    }

    ```


    Below are some of the possible error codes:


    | Code | Description |

    | --- | --- |

    | 010 | Malformed request: missing one or more mandatory core parameter(s)

    | 011 | Malformed request: missing one or more mandatory Payment Processor
    parameters

    | 012 | Malformed request: missing one or more mandatory SourceConnector
    parameters

    | 200 | Invalid data: the supplied data is incorrect (e.g. an invalid e-mail
    address).

    | 201 | Sort code or bank account is invalid (Bacs Direct Debit).

    | 202 | IBAN _&lt;your-IBAN&gt;_ is not valid.

    | 203 | The provided IBAN is not in SEPA geographical zone.

    | 204 | BIC is required to collect SEPA Direct Debit from a non-EAA country
    bank account.

    | 205 | Street, Housename or Number, Zip code and City are required to
    collect SEPA Direct Debit from a non-EEA country bank account.

    | 206 | Clearing number and/or bank account invalid (Sweden).

    | 998 | An object is missing and no default is specified in the org.

    | 999 | Error without specific category: consult the `error_message` for
    details.


    ## Webhook events and notifications


    To receive updates on payments created with the `/PaymentIntent` endpoint:


    - pass an endpoint URL in the `WebhookURL` parameter in the request body.

    - add your URL to the [Remote Site
    Setting](https://help.salesforce.com/articleView?id=configuring_remoteproxy.htm&type=5)
    of the Salesforce org.


    FinDock sends you notifications for the following events around your API
    call:


    | Event | Description |

    | ----- | ------------ |

    |`paymentIntent.processed` | Processing of the API call has finished
    successfully. This does not mean a payment is collected. |

    |`paymentIntent.in_review` | Processing of the API call has stalled and
    manual intervention from Salesforce side is needed. This does not stop the
    payer from completing the payment flow. |

    |`paymentIntent.failed` | Processing of theAPI call has failed and needs to
    be handled in the Salesforce environment. This does not stop the payer from
    completing the payment flow. |

    |`installment.created` | When an Installment record (expected one-time
    payment) is created. |

    |`installment.status_change` | If the `status` of the Installment record
    changes, either via a notification from a PSP or manually changed. |


    No specific events are sent for recurring payments other than the
    `paymentIntent` which contains the Salesforce Id of the recurring record.


    For more information about processing online payments, please [Processing
    online
    payments](/docs/@production/reconciliation/processing-and-reconciling-online-payments.md).


    For `paymentIntent` you receive notifications with the following body. Each
    event contains a `type` and a `data` object with further details.

    Check out the [PaymentIntent object
    schema](/api/payment-api-v2/payment-intent) for definitions.


    ```json

    {
      "type": "paymentIntent.processed",
      "data": {
        "Status": "Matched",
        "Recurring": {
          "Url": "/services/data/v65.0/sobjects/cpm__Recurring_Payment__c/a0V3X00000S7b5YUAR",
          "Type": "cpm__Recurring_Payment__c",
          "Id": "a0V3X00000S7b5YUAR"
        },
        "Payer": {
          "Contact": {
            "Url": "/services/data/v65.0/sobjects/Contact/0033X00003H9uZPQAZ",
            "Type": "Contact",
            "Id": "0033X00003H9uZPQAZ",
            "Name": "Test Payment"
          },
          "Account": {
            "Url": "/services/data/v65.0/sobjects/Account/0013X00002bZPGIQA4",
            "Type": "Account",
            "Id": "0013X00002bZPGIQA4",
            "Name": "Payment Family"
          }
        },
        "OneTime": {
          "Url": "/services/data/v65.0/sobjects/cpm__Installment__c/a083X00001mFTBAQA4",
          "Type": "cpm__Installment__c",
          "Id": "a083X00001mFTBAQA4",
          "Status": "Pending"
        },
        "Id": "pi_6cazikr7625yqt9mf"
      }
    }

    ```


    For `installment` you receive a notification with the following body.


    ```json

    {
      "type": "installment",
      "data": {
        "Url": "/services/data/v65.0/sobjects/cpm__Installment__c/a083X00001kJynLQAS",
        "Type": "cpm__Installment__c",
        "Id": "a083X00001kJynLQAS",
        "Target": "Adyen1",
        "Status": "Collected",
        "RecordTypeName": "Receivable",
        "PayUrl": "https://link.dev.findock.com/pay/3xxxxmuai2/8897b4da-e48a-7ff3-90dd-ecb65094802c",
        "Payments": [
          {
            "Url": "/services/data/v65.0/sobjects/cpm__Payment__c/a0R3X00000V1sutUAB",
            "Type": "cpm__Payment__c",
            "Id": "a0R3X00000V1sutUAB",
            "PaymentProcessor": "PaymentHub-Adyen",
            "PaymentMethod": "CreditCard",
            "CollectionDate": "2020-11-26",
            "Amount": 15
          }
        ],
        "PaymentProcessor": "PaymentHub-Adyen",
        "PaymentMethod": "CreditCard",
        "PaymentIntentId": "pi_5jthokq7z8som0w6o",
        "AmountOpen": 0,
        "Amount": 15
      }
    }

    ```
  license:
    name: FinDock
    url: https://findock.com/legal/
  version: v2
servers:
  - url: https://{instance}.my.salesforce.com/services/apexrest/cpm/v2
    description: Salesforce
    variables:
      instance:
        default: demo
        description: The domain name for your org.
security:
  - Salesforce_Production:
      - full
  - Salesforce_Sandbox:
      - full
tags:
  - name: Payment Intent
    description: >
      The `/PaymentIntent` endpoint supports handling both one-time and
      recurring payments. For recurring payments, a Recurring block replaces, or
      is

      added alongside, the OneTime block in the request. Some Payment Service
      Providers (PSPs) require or optionally support an initial payment

      (a OneTime block) AND Recurring block in the same request for
      authorization. You can find out the initial payment details for a given
      PSP

      using `GET /PaymentMethods`. 


      When using the endpoint to initiate new payments, check the org
      configuration and make sure you have the correct details by querying the

      [Payment Method](/api/payment-api-v2/payment-methods) and [Source
      Connectors](/api/payment-api-v2/source-connectors) endpoints. Some payment
      methods

      enable or require further [Package
      Actions](/api/payment-api-v2/package-actions). Be sure to also include
      these in the payment intent request.


      In addition to setting up new one-time or recurring payments, you can pay
      existing one-time payments (installments) and update existing recurring
      payments.

      To pay an existing installment, simply exclude the Payer block and add the
      Id of the installment to the OneTime block. We recommend first checking
      the

      details of the installment using `GET /Installment` with the GUID or
      record Id.


      To update the payment method, processor or other details of a recurring
      payment, remove the Payer block and add the identifier of the recurring
      payment

      to the Recurring block along with a PaymentMethod block that includes the
      details to be changed. As with installments, we recommend first checking
      current

      details by using `GET /Recurring` with the GUID or record Id.


      The endpoint also supports checking the status of payment intent inbound
      report processing. Use `GET /PaymentIntent/{ID}` where ID is payment
      intent Id

      of the one-time or recurring payment.
    externalDocs:
      description: Please see the specific payment processor articles for further details.
      url: https://docs.findock.com/docs/payment-processors
  - name: Installment
    description: >
      The `/Installment` endpoint allows you to retrieve detailed information
      about an existing
      [Installment](/docs/@production/data-model/installment.md),

      the FinDock equivalent of a one-time payment intent.
      [Payment](/docs/@production/data-model/payment.md) records in FinDock
      represent actual cash flow,

      so a single installment can have one or more related payments made with
      the same or different processors and payment methods.


      One-time payment intents created through the Payment API become
      installments. These and all other installments

      installments created through other channels can be queried through the
      `/Installment` endpoint.


      The response includes a list of all Payment records (cash movements)
      related to the queried installment.
  - name: Recurring
    description: >
      The `/Recurring` endpoint allows you to retrieve information about an
      existing recurring payments. These can be records for the FinDock
      Recurring

      Payment object or records for source-specific Salesforce objects such as
      Recurring Donation (NPSP) and Gift Commitment (Fundraising).


      The response includes a full list of details about the recurring payment
      which can be used to confirm and update, for example,

      the payment method and processor for future installment collections.
  - name: Payment Methods
    description: >
      This is an informational resource endpoint that returns a list of all
      available payment
      [processors](/docs/@production/payment-processors/index.md) and

      [methods](/docs/@production/payment-processors/payment-methods/payment-methods-overview.md).


      An org can have many method-processor combinations enabled. If there are
      multiple processors (PSPs) available for a payment method, one may be set
      to be the default processor for that method.
  - name: Source Connectors
    description: >
      This is an informational resource endpoint that returns the [source
      connector](/docs/@production/source-connectors/index.md) used in a
      specific Salesforce org. There is always a default source,

      but an org can have more than one source connector enabled.


      The source connector determines which payment-related objects FinDock
      needs to create and update in Salesforce when an action is initiated
      through the Payment API.
  - name: Package Actions
    description: >
      Informational resource endpoint that returns the package actions possible
      and/or required for a certain Salesforce environment.


      Package actions are additional actions that can be performed for a
      specific FinDock package, like a payment extension or source connector.

      These additional actions can be included in payment intent calls to the
      Payment API.


      If package actions are available, please refer to the specific
      [processor](/docs/@production/payment-processors/index.md) or

      [source connector](/docs/@production/source-connectors/index.md)
      documentation for further information.


      The [Gift Aid](/docs/@production/source-connectors/how-gift-aid-works.md)
      package, for example, has

      [package actions for
      declarations](/docs/@production/source-connectors/for-admins-and-sis-gift-aid-setup.md#using-the-payment-api-for-gift-aid-declarations).
paths:
  /PaymentIntent:
    post:
      tags:
        - Payment Intent
      operationId: PaymentIntent
      summary: Create, pay or update payments
      description: >
        The `/PaymentIntent` endpoint supports four POST operations: (1) create
        a new one-time payment, (2) create a new recurring payment, (3) pay an
        existing installment, and (4) update

        an existing recurring payment. All actions automatically update
        Salesforce data accordingly.
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/PaymentIntentNewOneTime'
                - $ref: '#/components/schemas/PaymentIntentNewRecurring'
                - $ref: '#/components/schemas/PaymentIntentPayInstallment'
                - $ref: '#/components/schemas/PaymentIntentUpdateRecurring'
            examples:
              BasicOneTime:
                $ref: '#/components/examples/BasicOneTime'
              BasicRecurring:
                $ref: '#/components/examples/BasicRecurring'
              BasicRecurringWithInitialPayment:
                $ref: '#/components/examples/BasicRecurringWithInitialPayment'
              BasicPayExistingInstallmentWithId:
                $ref: '#/components/examples/BasicPayExistingInstallmentWithId'
              BasicPayExistingInstallmentWithGUID:
                $ref: '#/components/examples/BasicPayExistingInstallmentWithGUID'
              AdvancedWithWebhook:
                $ref: '#/components/examples/AdvancedWithWebhook'
              AdvancedWithOverrideProcessor:
                $ref: '#/components/examples/AdvancedWithOverrideProcessor'
              AdvancedWithNonDefaultTarget:
                $ref: '#/components/examples/AdvancedWithNonDefaultTarget'
              AdvancedWithFullContactAndAccount:
                $ref: '#/components/examples/AdvancedWithFullContactAndAccount'
              AdvancedWithOriginCampaign:
                $ref: '#/components/examples/AdvancedWithOriginCampaign'
              AdvancedWithOneTimeSFFields:
                $ref: '#/components/examples/AdvancedWithOneTimeSFFields'
              AdvancedWithRecurringSFFields:
                $ref: '#/components/examples/AdvancedWithRecurringSFFields'
              AdvancedWithInboundReportSFFields:
                $ref: '#/components/examples/AdvancedWithInboundReportSFFields'
              AdvancedWithPackageActions:
                $ref: '#/components/examples/AdvancedWithPackageActions'
              AdvancedWithMultiCurrency:
                $ref: '#/components/examples/AdvancedWithMultiCurrency'
              AdvancedWithIdempotencyKey:
                $ref: '#/components/examples/AdvancedWithIdempotencyKey'
              AdvancedWithSourceAndMatchingSetup:
                $ref: '#/components/examples/AdvancedWithSourceAndMatchingSetup'
              UpdateRecurringMethod:
                $ref: '#/components/examples/UpdateRecurringMethod'
              UpdateRecurringMethodProcessor:
                $ref: '#/components/examples/UpdateRecurringMethodProcessor'
              UpdateRecurringMethodProcessorTarget:
                $ref: '#/components/examples/UpdateRecurringMethodProcessorTarget'
              UpdateRecurringMethodWithInitialPayment:
                $ref: '#/components/examples/UpdateRecurringMethodWithInitialPayment'
      responses:
        '200':
          description: API was called successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentIntentSuccessResponse'
        '400':
          description: The message was well-formed, but could not be processed.
          content:
            'text/plain:':
              schema:
                type: string
        '422':
          description: >-
            Something was wrong with the request parameters sent to the API. See
            [Error and response
            codes](/api/payment-api-v2/section/error-and-response-codes) for
            more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentIntentFailedResponse422'
        '500':
          description: Correct Request, but API call failed on an internal server error.
          content:
            'text/plain:':
              schema:
                type: string
  /PaymentIntent/{ID}:
    get:
      tags:
        - Payment Intent
      operationId: PaymentStatus
      summary: Check inbound report status
      description: >
        Use this operation to get the status of the inbound report of a payment
        intent along with information about the related installment or recurring
        payment

        (Recurring Payment, Gift Commitment or Recurring Donation object
        record). To get details of the related records themselves, use the
        [/Installment](/api/payment-api-v2/installment/)

        and [/Recurring](/api/payment-api-v2/recurring) endpoints.
      parameters:
        - name: ID
          in: path
          required: true
          description: The Id of the payment intent to check.
          schema:
            type: string
            example: pi_1hubybk7nh45rvbt6
      responses:
        '200':
          description: API was called successfully.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: >-
                      #/components/schemas/GetPaymentIntentOneTimeSuccessResponse
                  - $ref: >-
                      #/components/schemas/GetPaymentIntentRecurringSuccessResponse
        '400':
          description: The message was well-formed, but could not be processed.
          content:
            'text/plain:':
              schema:
                type: string
        '422':
          description: >-
            Unprocessable Entity: The message was well-formed, but could not be
            processed. See [Error and response
            codes](/api/payment-api-v2/section/error-and-response-codes) for
            more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPaymentIntentFailedResponse422'
        '500':
          description: Correct Request, but API call failed on an internal server error.
          content:
            'text/plain:':
              schema:
                type: string
  /Installment/{ID}:
    get:
      tags:
        - Installment
      operationId: InstallmentDetails
      summary: Get installment details
      description: >
        This endpoint returns detailed information of an Installment record in
        Salesforce, including status and related Payment records.
      parameters:
        - name: ID
          in: path
          required: true
          description: The record Id or GUID of the installment to query.
          schema:
            type: string
            example: a083X00001aUMCnQAO
      responses:
        '200':
          description: API was called successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetInstallmentSuccessResponse'
        '400':
          description: The message was well-formed, but could not be processed.
          content:
            'text/plain:':
              schema:
                type: string
        '422':
          description: >-
            Unprocessable Entity: The message was well-formed, but could not be
            processed. See [Error and response
            codes](/api/payment-api-v2/section/error-and-response-codes) for
            more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetInstallmentFailedResponse422'
        '500':
          description: Correct Request, but API call failed on an internal server error.
          content:
            'text/plain:':
              schema:
                type: string
  /Recurring/{ID}:
    get:
      tags:
        - Recurring
      operationId: RecurringDetails
      summary: Get recurring payment details
      description: >
        This endpoint returns detailed information of a recurring payment in
        Salesforce. The record is source-specific, so you need to ensure you are
        referencing the correct object record.

        The object may be the FinDock Recurring Payment or Salesforce objects
        like Recurring Donation or Gift Commitment.
      parameters:
        - name: ID
          in: path
          required: true
          description: The record Id or GUID of the recurring payment record to query.
          schema:
            type: string
            example: a083X00001aUMCnQAO
      responses:
        '200':
          description: API was called successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRecurringSuccessResponse'
        '400':
          description: The message was well-formed, but could not be processed.
          content:
            'text/plain:':
              schema:
                type: string
        '422':
          description: >-
            Unprocessable Entity: The message was well-formed, but could not be
            processed. See [Error and response
            codes](/api/payment-api-v2/section/error-and-response-codes) for
            more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRecurringFailedResponse422'
        '500':
          description: Correct Request, but API call failed on an internal server error.
          content:
            'text/plain:':
              schema:
                type: string
  /PaymentMethods:
    get:
      tags:
        - Payment Methods
      operationId: GetPaymentMethods
      summary: Get payment methods and processors
      description: >-
        This endpoint returns a complete list of activated payment methods in
        the Salesforce org and the payment processors configured to process
        those methods.
      responses:
        '200':
          description: API was called successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPaymentMethodsSuccessResponse'
        '400':
          description: The message was well-formed, but could not be processed.
          content:
            'text/plain:':
              schema:
                type: string
        '422':
          description: >-
            Unprocessable Entity: The message was well-formed, but could not be
            processed. See [Error and response
            codes](/api/payment-api-v2/section/error-and-response-codes) for
            more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPaymentMethodsFailedResponse422'
        '500':
          description: Correct Request, but API call failed on an internal server error.
          content:
            'text/plain:':
              schema:
                type: string
  /SourceConnector:
    get:
      tags:
        - Source Connectors
      operationId: GetSourceConnectors
      summary: Get available sources
      description: >-
        This endpoint returns the configured source connectors in the Salesforce
        org.
      responses:
        '200':
          description: API was called successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSourceConnectorsSuccessResponse'
        '400':
          description: The message was well-formed, but could not be processed.
          content:
            'text/plain:':
              schema:
                type: string
        '422':
          description: >-
            Unprocessable Entity: The message was well-formed, but could not be
            processed. See [Error and response
            codes](/api/payment-api-v2/section/error-and-response-codes) for
            more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSourceConnectorsFailedResponse422'
        '500':
          description: Correct Request, but API call failed on an internal server error.
          content:
            'text/plain:':
              schema:
                type: string
  /PackageActions:
    get:
      tags:
        - Package Actions
      operationId: GetPackageActions
      summary: Get details of package-specific actions
      description: >-
        This endpoint returns a list of unique actions that specific to a given
        source connector or payment extension.
      responses:
        '200':
          description: API was called successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPackageActionsSuccessResponse'
        '400':
          description: The message was well-formed, but could not be processed.
          content:
            'text/plain:':
              schema:
                type: string
        '422':
          description: >-
            Unprocessable Entity: The message was well-formed, but could not be
            processed. See [Error and response
            codes](/api/payment-api-v2/section/error-and-response-codes) for
            more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPackageActionsFailedResponse422'
        '500':
          description: Correct Request, but API call failed on an internal server error.
          content:
            'text/plain:':
              schema:
                type: string
components:
  securitySchemes:
    Salesforce_Production:
      type: oauth2
      description: >
        The Payment API uses [the Salesforce OAuth2.0 web server
        flow](https://help.salesforce.com/articleView?id=remoteaccess_oauth_web_server_flow.htm&type=5)

        for production orgs. The required flow and scope depends on the specific
        operation. For further information, see
        [Authentication](/api/payment-api-v2/section/authentication).
      flows:
        authorizationCode:
          authorizationUrl: https://login.salesforce.com/services/oauth2/authorize
          tokenUrl: https://{instance}.my.salesforce.com/services/oauth2/token
          scopes:
            full: Full access
    Salesforce_Sandbox:
      type: oauth2
      description: >
        The Payment API uses [the Salesforce OAuth2.0 web server
        flow](https://help.salesforce.com/articleView?id=remoteaccess_oauth_web_server_flow.htm&type=5)

        for sandbox orgs. The required flow and scope depends on the specific
        operation. For further information, see
        [Authentication](/api/payment-api-v2/section/authentication).
      flows:
        authorizationCode:
          authorizationUrl: https://test.salesforce.com/services/oauth2/authorize
          tokenUrl: https://{instance}.my.salesforce.com/services/oauth2/token
          scopes:
            full: Full access
  schemas:
    PaymentIntentNewOneTime:
      type: object
      description: >-
        A payment intent message to create a one-time payment captured as an
        Installment record in Salesforce.
      required:
        - SuccessURL
        - FailureURL
        - Payer
        - OneTime
        - PaymentMethod
      properties:
        SuccessURL:
          type: string
          format: url
          description: >-
            The URL the payer is redirected to when a payment has been completed
            successfully.
          example: https://hostdomain.com/success
        FailureURL:
          type: string
          format: url
          description: >-
            The URL the user is redirected to when a payment has failed or was
            cancelled.
          example: https://hostdomain.com/failure
        RedirectURL:
          type: string
          format: url
          description: >
            The URL where the user should be redirected to so additional
            information can be provided to complete the payment.

            This is primarily used for hosted payment forms of PSPs.
          example: https://redirect-hostdomain.com/checkout/payment-parameters
        WebhookURL:
          type: string
          format: url
          description: >-
            URL where you want to receive [webhook
            notifications](/api/payment-api-v2/section/webhook-events-and-notifications)
            about the status of the payment.
          example: https://hostdomain.com/endpoint
        Origin:
          type: string
          description: >-
            The channel used to create the payment intent, such as a payment
            form on a webpage. This information can be used when building
            customized follow-up logic in Salesforce.
          example: Campaign payment form
        CampaignId:
          type: string
          description: >-
            Id of a Campaign record in Salesforce. When a valid value is passed,
            the campaign is linked to the installment or recurring payment
            object in Salesforce."
          example: 7013X000001mAZbQAM
        Payer:
          type: object
          description: >-
            Information about the payer captured in a new or existing Account
            and/or Contact record.
          anyOf:
            - $ref: '#/components/schemas/Account'
            - $ref: '#/components/schemas/Contact'
        OneTime:
          type: object
          description: Value of the payment in the given currency.
          required:
            - Amount
          properties:
            Amount:
              type: number
              description: The amount collected or disbursed.
              example: 10
            CurrencyISOCode:
              type: string
              description: >-
                A valid [ISO 4217 currency
                code](https://www.iso.org/iso-4217-currency-codes.html). May be
                required depending on the Salesforce org configuration.
              example: EUR
        PaymentMethod:
          type: object
          description: The payment processing details for the one-time payment.
          required:
            - Name
          properties:
            Name:
              type: string
              description: Name of the payment method.
              example: CreditCard
            Processor:
              type: string
              description: >
                Name of the FinDock package for the payment processor. If no
                processor is specified,

                FinDock uses the default processor configured for the payment
                method.
              example: PaymentHub-Stripe
            Target:
              type: string
              description: >
                The merchant account that gets the money from the payment. If no
                target is provided,

                FinDock uses whichever target that is set as the default in the
                payment processor configuration.
              example: Stripe-Main-Account
            Parameters:
              type: object
              description: >-
                Additional parameters for the given payment method and processor
                combination.
              example:
                locale: en-GB
        Settings:
          type: object
          description: >
            Additional information on how the payment should be processed in
            Salesforce. Includes the source connector and additional parameters

            like `ProcessingType` that can be used for [Guided
            Matching](/docs/@production/reconciliation/what-is-guided-matching.md).
          properties:
            SourceConnector:
              type: string
              description: >
                The name of the source connector to use for processing, e.g.
                'PaymentHub', `PaymentHub-for-NPSP` or
                'FinDock-for-Fundraising'.

                If no source connector is passed in the request, the default
                source connector set in the FinDock configuration is used.
              example: PaymentHub-for-NPSP
            ProcessingType:
              type: string
              description: >
                The Sub Type name of the Inbound Report which determines the
                [Guided
                Matching](/docs/@production/reconciliation/what-is-guided-matching.md)

                setup which drives the data processing.
              example: CustomInboundReportSubType
        SalesforceFields:
          type: object
          description: >
            The SalesforceFields block is used to pass and values for the given
            object in Salesforce. To find out which fields are available, check
            the Object Manager in the Salesforce Setup.
          example:
            cpm__Campaign__c: a070Y000005M7t6
            cpm__Origin__c: Online payment form
        PackageActions:
          type: object
          description: >-
            Additional, package-specific actions to be performed with the
            payment intent.
          example:
            PaymentHub-GiftAid:
              CreateGiftAidDeclaration:
                dateMade: '2025-01-15'
                startDate: '2025-02-01'
                firstName: Test
                lastName: Donor
                houseNameOrNumber: 12
                postalCode: L68 0AQ
                acquisitionMethod: Digital
    PaymentIntentNewRecurring:
      type: object
      description: >
        A payment intent message to create a new recurring payment in
        Salesforce. The record may be Recurring Payment, Recurring Donation,
        etc.

        depending on the source connector.
      required:
        - SuccessURL
        - FailureURL
        - Payer
        - Recurring
        - PaymentMethod
      properties:
        SuccessURL:
          type: string
          format: url
          description: >-
            The URL the payer is redirected to when a payment has been completed
            successfully.
          example: https://hostdomain.com/success
        FailureURL:
          type: string
          format: url
          description: >-
            The URL the user is redirected to when a payment has failed or was
            cancelled.
          example: https://hostdomain.com/failure
        RedirectURL:
          type: string
          format: url
          description: >
            The URL where the user should be redirected to so additional
            information can be provided to complete the payment.

            This is primarily used for hosted payment forms of PSPs.
          example: https://redirect-hostdomain.com/checkout/payment-parameters
        WebhookURL:
          type: string
          format: url
          description: >-
            URL where you want to receive [webhook
            notifications](/api/payment-api-v2/section/webhook-events-and-notifications)
            about the status of the payment.
          example: https://hostdomain.com/endpoint
        Origin:
          type: string
          description: >-
            The channel used to create the payment intent, such as a payment
            form on a webpage. This information can be used when building
            customized follow-up logic in Salesforce.
          example: Campaign payment form
        CampaignId:
          type: string
          description: >-
            Id of a Campaign record in Salesforce. When a valid value is passed,
            the campaign is linked to the installment or recurring payment
            object in Salesforce."
          example: 7013X000001mAZbQAM
        Payer:
          type: object
          description: >-
            Information about the payer captured in a new or existing Account
            and/or Contact record.
          anyOf:
            - $ref: '#/components/schemas/Account'
            - $ref: '#/components/schemas/Contact'
        OneTime:
          type: object
          description: >-
            One-time charge that may be required to set up and authorize the new
            recurring payment.
          required:
            - Amount
          properties:
            Amount:
              type: number
              description: The initial amount to be collected once.
              example: 25
        Recurring:
          required:
            - Amount
            - Frequency
            - StartDate
          properties:
            Amount:
              type: number
              description: The amount to be collected at regular intervals.
              example: 10
            Frequency:
              type: string
              description: >
                The frequency with which installments are collected. e.g.
                'Weekly', 'Monthly'. The formatting of the frequency options

                depends on the source connector you provide in the payment
                intent message. Please adjust your values accordingly.
              example: Monthly
            CurrencyISOCode:
              type: string
              description: >-
                A valid [ISO 4217 currency
                code](https://www.iso.org/iso-4217-currency-codes.html). May be
                required depending on the Salesforce org configuration.
              example: EUR
            StartDate:
              type: string
              format: date
              description: >-
                The first date the recurring payment is collected. Format is
                yyyy-mm-dd.
              example: '2025-01-01'
            EndDate:
              type: string
              format: date
              description: >-
                The last date the recurring payment is collected. Format is
                yyyy-mm-dd.
              example: '2025-12-01'
        PaymentMethod:
          type: object
          description: The payment processing details for the one-time payment.
          required:
            - Name
          properties:
            Name:
              type: string
              description: Name of the payment method.
              example: CreditCard
            Processor:
              type: string
              description: >
                Name of the FinDock package for the payment processor. If no
                processor is specified,

                FinDock uses the default processor configured for the payment
                method.
              example: PaymentHub-Stripe
            Target:
              type: string
              description: >
                The merchant account that gets the money from the payment. If no
                target is provided,

                FinDock uses whichever target that is set as the default in the
                payment processor configuration.
              example: Stripe-Main-Account
            Parameters:
              type: object
              description: >-
                Additional parameters for the given payment method and processor
                combination.
              example:
                locale: en-GB
                description: Monthly membership fee
        Settings:
          type: object
          description: >
            Additional information on how the payment should be processed in
            Salesforce. Includes the source connector and additional parameters

            like `ProcessingType` that can be used for [Guided
            Matching](/docs/@production/reconciliation/what-is-guided-matching.md).
          properties:
            SourceConnector:
              type: string
              description: >
                The name of the source connector to use for processing, e.g.
                'PaymentHub', `PaymentHub-for-NPSP` or
                'FinDock-for-Fundraising'.

                If no source connector is passed in the request, the default
                source connector set in the FinDock configuration is used.
              example: PaymentHub-for-NPSP
            ProcessingType:
              type: string
              description: >
                The Sub Type name of the Inbound Report which determines the
                [Guided
                Matching](/docs/@production/reconciliation/what-is-guided-matching.md)

                setup which drives the data processing.
              example: CustomInboundReportSubType
        SalesforceFields:
          type: object
          description: >
            The SalesforceFields block is used to pass and values for the given
            object in Salesforce. To find out which fields are available, check
            the Object Manager in the Salesforce Setup.
          example:
            cpm__Campaign__c: a070Y000005M7t6
            cpm__Origin__c: Online payment form
        PackageActions:
          type: object
          description: >-
            Additional, package-specific actions to be performed with the
            payment intent.
          example:
            PaymentHub-GiftAid:
              CreateGiftAidDeclaration:
                dateMade: '2025-01-15'
                startDate: '2025-02-01'
                firstName: Test
                lastName: Donor
                houseNameOrNumber: 12
                postalCode: L68 0AQ
                acquisitionMethod: Digital
    PaymentIntentPayInstallment:
      type: object
      description: >
        A payment intent message to pay some or all of the open amount of an
        existing Installment record in Salesforce.
      required:
        - SuccessURL
        - FailureURL
        - Payer
        - OneTime
        - PaymentMethod
      properties:
        SuccessURL:
          type: string
          format: url
          description: >-
            The URL the payer is redirected to when a payment has been completed
            successfully.
          example: https://hostdomain.com/success
        FailureURL:
          type: string
          format: url
          description: >-
            The URL the user is redirected to when a payment has failed or was
            cancelled.
          example: https://hostdomain.com/failure
        RedirectURL:
          type: string
          format: url
          description: >
            The URL where the user should be redirected to so additional
            information can be provided to complete the payment.

            This is primarily used for hosted payment forms of PSPs.
          example: https://redirect-hostdomain.com/checkout/payment-parameters
        WebhookURL:
          type: string
          format: url
          description: >-
            URL where you want to receive [webhook
            notifications](/api/payment-api-v2/section/webhook-events-and-notifications)
            about the status of the payment.
          example: https://hostdomain.com/endpoint
        Origin:
          type: string
          description: >-
            The channel used to create the payment intent, such as a payment
            form on a webpage. This information can be used when building
            customized follow-up logic in Salesforce.
          example: Campaign payment form
        CampaignId:
          type: string
          description: >-
            Id of a Campaign record in Salesforce. When a valid value is passed,
            the campaign is linked to the installment or recurring payment
            object in Salesforce."
          example: 7013X000001mAZbQAM
        Payer:
          type: object
          description: >-
            Information about the payer captured in a new or existing Account
            and/or Contact record.
          anyOf:
            - $ref: '#/components/schemas/Account'
            - $ref: '#/components/schemas/Contact'
        OneTime:
          type: object
          description: >
            Identification of the installment to be paid. The amount to pay is
            determined by the Amount Open

            field on the Installment record.
          required:
            - Id
          properties:
            Id:
              type: string
              description: The record Id or GUID of the installment.
              example: a083X00001aUMCnQAO
        PaymentMethod:
          type: object
          description: The payment processing details for the one-time payment.
          required:
            - Name
          properties:
            Name:
              type: string
              description: Name of the payment method.
              example: CreditCard
            Processor:
              type: string
              description: >
                Name of the FinDock package for the payment processor. If no
                processor is specified,

                FinDock uses the default processor configured for the payment
                method.
              example: PaymentHub-Stripe
            Target:
              type: string
              description: >
                The merchant account that gets the money from the payment. If no
                target is provided,

                FinDock uses whichever target that is set as the default in the
                payment processor configuration.
              example: Stripe-Main-Account
            Parameters:
              type: object
              description: >-
                Additional parameters for the given payment method and processor
                combination.
              example:
                locale: en-GB
                description: Monthly membership fee
        Settings:
          type: object
          description: >
            Additional information on how the payment should be processed in
            Salesforce. Includes the source connector and additional parameters

            like `ProcessingType` that can be used for [Guided
            Matching](/docs/@production/reconciliation/what-is-guided-matching.md).
          properties:
            SourceConnector:
              type: string
              description: >
                The name of the source connector to use for processing, e.g.
                'PaymentHub', `PaymentHub-for-NPSP` or
                'FinDock-for-Fundraising'.

                If no source connector is passed in the request, the default
                source connector set in the FinDock configuration is used.
              example: PaymentHub-for-NPSP
            ProcessingType:
              type: string
              description: >
                The Sub Type name of the Inbound Report which determines the
                [Guided
                Matching](/docs/@production/reconciliation/what-is-guided-matching.md)

                setup which drives the data processing.
              example: CustomInboundReportSubType
        SalesforceFields:
          type: object
          description: >
            The SalesforceFields block is used to pass and values for the given
            object in Salesforce. To find out which fields are available, check
            the Object Manager in the Salesforce Setup.
          example:
            cpm__Campaign__c: a070Y000005M7t6
            cpm__Origin__c: Online payment form
        PackageActions:
          type: object
          description: >-
            Additional, package-specific actions to be performed with the
            payment intent.
          example:
            PaymentHub-GiftAid:
              CreateGiftAidDeclaration:
                dateMade: '2025-01-15'
                startDate: '2025-02-01'
                firstName: Test
                lastName: Donor
                houseNameOrNumber: 12
                postalCode: L68 0AQ
                acquisitionMethod: Digital
    PaymentIntentUpdateRecurring:
      type: object
      description: >
        A payment intent message to update an existing recurring payment in
        Salesforce. The record may be Recurring Payment, Recurring Donation,
        etc.

        depending on the source connector.
      required:
        - SuccessURL
        - FailureURL
        - Recurring
        - PaymentMethod
      properties:
        SuccessURL:
          type: string
          format: url
          description: >-
            The URL the payer is redirected to when a payment has been completed
            successfully.
          example: https://hostdomain.com/success
        FailureURL:
          type: string
          format: url
          description: >-
            The URL the user is redirected to when a payment has failed or was
            cancelled.
          example: https://hostdomain.com/failure
        RedirectURL:
          type: string
          format: url
          description: >
            The URL where the user should be redirected to so additional
            information can be provided to complete the payment.

            This is primarily used for hosted payment forms of PSPs.
          example: https://redirect-hostdomain.com/checkout/payment-parameters
        WebhookURL:
          type: string
          format: url
          description: >-
            URL where you want to receive [webhook
            notifications](/api/payment-api-v2/section/webhook-events-and-notifications)
            about the status of the payment.
          example: https://hostdomain.com/endpoint
        OneTime:
          type: object
          description: >-
            One-time charge that may be required to authorize the updated
            recurring payment method.
          required:
            - Amount
          properties:
            Amount:
              type: number
              description: An initial amount to be collected once.
              example: 1
        Recurring:
          required:
            - Id
          properties:
            Id:
              type: string
              description: The record Id or GUID of the recurring payment.
              example: a0V3X00000S7BuCUAV
        PaymentMethod:
          type: object
          description: The payment processing details for the one-time payment.
          required:
            - Name
          properties:
            Name:
              type: string
              description: Name of the payment method.
              example: CreditCard
            Processor:
              type: string
              description: >
                Name of the FinDock package for the payment processor. If no
                processor is specified,

                FinDock uses the default processor configured for the payment
                method.
              example: PaymentHub-Stripe
            Target:
              type: string
              description: >
                The merchant account that gets the money from the payment. If no
                target is provided,

                FinDock uses whichever target that is set as the default in the
                payment processor configuration.
              example: Stripe-Main-Account
            Parameters:
              type: object
              description: >-
                Additional parameters for the given payment method and processor
                combination.
              example:
                locale: en-GB
                description: Monthly membership fee
    PaymentIntentSuccessResponse:
      type: object
      properties:
        Id:
          type: string
          description: >-
            The Payment Intent Id. Can also be found on the Inbound Report
            record in Salesforce.
          example: pi_1hubybk7nh45rvbt6
        PaymentMethod:
          properties:
            Name:
              example: CreditCard
            Processor:
              example: PaymentHub-Stripe
            Target:
              example: Stripe-Main
            Parameters:
              example:
                description: Monthly membership fee
        Settings:
          properties:
            SourceConnector:
              example: PaymentHub-for-NPSP
        RedirectURL:
          example: https://redirect-hostdomain.com/checkout/payment-parameters
    PaymentIntentFailedResponse422:
      type: object
      required:
        - error_code
        - error_message
      properties:
        error_code:
          type: integer
          format: int32
          example: 999
        error_message:
          type: string
          example: 'Contact error: Required fields are missing: [LastName]'
    GetPaymentIntentOneTimeSuccessResponse:
      type: object
      properties:
        Id:
          description: Payment intent Id from the inbound report.
          type: string
          example: pi_1hubybk7nh45rvbt6
        Status:
          description: Current status of the payment intent inbound report.
          type: string
          example: Matched
        Payer:
          description: >-
            Contact and/or Account record details for the payer that can be used
            for followup actions.
          type: object
          properties:
            Contact:
              properties:
                Url:
                  example: /services/data/v65.0/sobjects/Contact/a0P3X00000WjR8AUAV
                Type:
                  example: Contact
                Id:
                  example: a0P3X00000WjR8AUAV
                Name:
                  example: Test Payer
            Account:
              properties:
                Url:
                  example: /services/data/v65.0/sobjects/Account/0011j00000itNdlAAE
                Type:
                  example: Account
                Id:
                  example: 0011j00000itNdlAAE
                Name:
                  example: Payer Family
        OneTime:
          description: >-
            Details about the installment related to the payment intent inbound
            report.
          type: object
          properties:
            Url:
              example: >-
                /services/data/v65.0/sobjects/cpm__Installment__c/a083X00001aUMCnQAO
            Type:
              example: cpm__Installment__c
            Id:
              example: a083X00001aUMCnQAO
            Status:
              example: Collected
    GetPaymentIntentRecurringSuccessResponse:
      type: object
      properties:
        Id:
          description: Payment intent Id from the inbound report.
          type: string
          example: pi_1hubybk7nh45rvbt6
        Status:
          description: Current status of the payment intent inbound report.
          type: string
          example: Matched
        Payer:
          description: >-
            Contact and/or Account record details for the payer that can be used
            for followup actions.
          type: object
          properties:
            Contact:
              properties:
                Url:
                  example: /services/data/v65.0/sobjects/Contact/a0P3X00000WjR8AUAV
                Type:
                  example: Contact
                Id:
                  example: a0P3X00000WjR8AUAV
                Name:
                  example: Test Payer
            Account:
              properties:
                Url:
                  example: /services/data/v65.0/sobjects/Account/0011j00000itNdlAAE
                Type:
                  example: Account
                Id:
                  example: 0011j00000itNdlAAE
                Name:
                  example: Payer Family
        Recurring:
          description: >-
            Details about the installment related to the payment intent inbound
            report.
          type: object
          properties:
            Url:
              example: >-
                /services/data/v65.0/sobjects/cpm__Recurring_Payment__c/a0V3X00000RKBZmUAP
            Type:
              example: cpm__Recurring_Payment__c
            Id:
              example: a0V3X00000RKBZmUAP
    GetPaymentIntentFailedResponse422:
      type: object
      required:
        - error_code
        - error_message
      properties:
        error_code:
          type: integer
          format: int32
          example: 999
        error_message:
          type: string
          example: >-
            Payment intent not found: Please check that the supplied Id value is
            correct.
    GetInstallmentSuccessResponse:
      type: object
      description: >-
        Details about an installment, which represents a one-time payment in
        Salesforce.
      properties:
        Id:
          type: string
          description: The Salesforce record Id of the installment.
          example: a083X00001aUMCnQAO
        GUID:
          type: string
          description: The Salesforce GUID of the installment.
          example: sdfasdf-asfads-242134-adsfadf-23423
        Url:
          type: string
          description: The Salesforce URL of the installment.
          example: /services/data/63.0/sobjects/cpm__Installment__c/a083X00001aUMCnQAO
        Type:
          type: string
          description: The Salesforce object type.
          example: cpm__Installment__c
        Status:
          type: string
          description: >
            The status of the installment. For more information, see
            [installment status and
            counters](/docs/@production/data-model/installment.md#status-and-counters).
          enum:
            - Cancelled
            - Collected
            - Failed
            - New
            - Outstanding
            - Paid
            - Pending
            - Partially paid
            - Pending Processing
            - Pending recollection
            - Refunded
            - Rejected
            - Reversed
          example: Collected
        Amount:
          type: number
          description: The original amount to be collected.
          example: 10
        AmountOpen:
          type: number
          description: >-
            The amount still to be collected, i.e. original amount minus any
            already paid amounts.
          example: 0
        Target:
          description: >-
            The name of the target, a bank account or PSP merchant account,
            specified for the installment.
          example: PRIMARY-BANK-ACCOUNT
        RecordTypeName:
          type: string
          description: >-
            The record type of the installment for incoming payment and Payable
            for outgoing payments.
          example: Receivable
        PayUrl:
          type: string
          description: >-
            URL that can be used to pay this installment. This can be a
            [PayLinks](/docs/@production/payments/configuring-findock-paylinks.md)
            or [Tikkie
            URL](/docs/@production/payment-processors/using-tikkie.md#tikkie-url.md).
          example: >-
            https://link.dev.findock.com/pay/3xxxxmuai2/8897b4da-e48a-7ff3-90dd-ecb65094802c
        PayLinkPage:
          type: string
          description: >-
            The slug for the PayLink URL if multiple PayLinks pages are
            configured in the org.
          example: pageAbcSlug
        PaymentProcessor:
          description: >-
            The name of the payment processor package used to process the
            installment.
          example: PaymentHub-SEPA
        PaymentMethod:
          description: The name of the payment method used by the installment.
          example: DirectDebit
        PaymentIntentId:
          description: The Id of the payment intent that created the installment.
          example: pi_1hubybk7nh45rvbt6
        Payments:
          $ref: '#/components/schemas/Payment'
    GetInstallmentFailedResponse422:
      type: object
      required:
        - error_code
        - error_message
      properties:
        error_code:
          type: integer
          format: int32
          example: 999
        error_message:
          type: string
          example: >-
            Installment not found: Please check that the supplied Id value is
            correct.
    GetRecurringSuccessResponse:
      type: object
      description: Details about an existing recurring payment.
      properties:
        Url:
          type: string
          description: The Salesforce URL of the recurring payment.
          example: >-
            /services/data/v65.0/sobjects/cpm__Recurring_Payment__c/a0V3X00000RKBZmUAP
        Type:
          type: string
          description: >-
            The type of recurring payment object used in Salesforce. This can be
            the FinDock object `cpm__Recurring_Payment__c` or an object from a
            source package like Recurring Donation.
          example: cpm__Recurring_Payment__c
        SetupUrl:
          type: string
          description: >-
            The URL to a payment setup page where the payer can update how the
            recurring payment will be paid.
          example: >-
            https://link.dev.findock.com/pay/3xxxxmuai2/8897b4da-e48a-7ff3-90dd-ecb65094802c
        PayLinkPage:
          type: string
          description: >-
            The slug for the payment setup page when multiple PayLinks pages are
            configured in the org.
          example: pageAbcSlug
        PaymentProcessor:
          description: >-
            The name of the payment processor package used to process the
            recurring payment.
          example: PaymentHub-SEPA
        PaymentMethod:
          description: The name of the payment method used by the recurring payment.
          example: DirectDebit
        Id:
          type: string
          description: The unique ID of the recurring payment in Salesforce.
          example: a0V3X00000RKBZmUAP
        GUID:
          type: string
          description: The Salesforce GUID of the recurring payment.
          example: sdfasdf-asfads-242134-adsfadf-23423
        Amount:
          type: number
          description: The amount to be collected at a specific frequency.
          example: 25
        CurrencyISOCode:
          type: string
          description: >-
            A valid [ISO 4217 currency
            code](https://www.iso.org/iso-4217-currency-codes.html). May be
            required depending on the Salesforce org configuration.
          example: EUR
        Frequency:
          type: string
          description: >-
            The frequency with which installments are collected. e.g. 'Weekly',
            'Monthly'. NOTE: The formatting of the frequency options depends on
            the source connector you provide in the request. Please adjust your
            values accordingly.
          example: Monthly
        RecordTypeName:
          type: string
          description: >-
            The Salesforce
            [RecordType](/#salesforce-objects-recordtypes-and-fields) of the
            recurring payment.
          example: Subscription
        StartDate:
          type: string
          format: date
          description: >-
            The first date the recurring payment is collected. Format is
            yyyy-mm-dd.
          example: '2025-01-01'
        EndDate:
          type: string
          format: date
          description: >-
            The last date the recurring payment is collected. Format is
            yyyy-mm-dd.
          example: '2025-12-01'
        Description:
          type: string
          description: The text from the description on the recurring payment.
          example: Monthly subscription payment
        SourceConnector:
          type: string
          description: The source of the recurring payment data.
          example: PaymentHub
    GetRecurringFailedResponse422:
      type: object
      required:
        - error_code
        - error_message
      properties:
        error_code:
          type: integer
          format: int32
          example: 999
        error_message:
          type: string
          example: >-
            Recurring record not found: Please check that the supplied Id value
            is correct.
    GetPaymentMethodsSuccessResponse:
      type: object
      description: >-
        A list of available payment methods and the configured payment
        processors that can use those methods.
      properties:
        PaymentMethods:
          type: object
          properties:
            Name:
              type: string
              description: >-
                The name of the payment method, e.g. `DirectDebit`, `CreditCard`
                or `Ideal`.
              example: DirectDebit
            Processors:
              type: array
              description: >
                A list of the payment processors that can be used to process
                payments with this payment method. Each entry includes details
                about

                the processor-method combination, like whether it supports
                recurring payments and additional parameters.
              items:
                $ref: '#/components/schemas/PaymentProcessor'
    GetPaymentMethodsFailedResponse422:
      type: object
      required:
        - error_code
        - error_message
      properties:
        error_code:
          type: integer
          format: int32
          example: 999
        error_message:
          type: string
          example: >-
            An unexpected error occurred. Please contact FinDock Support for
            assistance.
    GetSourceConnectorsSuccessResponse:
      type: object
      description: A list of available sources.
      properties:
        SourceConnectors:
          type: array
          items:
            $ref: '#/components/schemas/SourceConnector'
    GetSourceConnectorsFailedResponse422:
      type: object
      required:
        - error_code
        - error_message
      properties:
        error_code:
          type: integer
          format: int32
          example: 999
        error_message:
          type: string
          example: >-
            An unexpected error occurred. Please contact FinDock Support for
            assistance.
    GetPackageActionsSuccessResponse:
      type: object
      properties:
        ResponseCode:
          type: string
          enum:
            - '001'
        IsSuccess:
          type: boolean
          enum:
            - true
        PackageActions:
          type: array
          description: >-
            A list of package actions and details about the parameters for each
            named action.
          example:
            - PackageName: PaymentHub-GiftAid
              actions:
                - Parameters:
                    - required: true
                      name: dateMade
                      description: Date made of the Gift Aid Declaration
                      dataType: Date
                    - name: startDate
                      description: Start date of the Gift Aid Declaration
                      dataType: Date
                    - name: endDate
                      description: End date of the Gift Aid Declaration
                      dataType: Date
                    - name: confirmationDate
                      description: Confirmation Date of the Gift Aid Declaration
                      dataType: Date
                    - name: acquisitionMethod
                      description: Acquisition Method
                      dataType: String
                    - name: title
                      description: Title
                      dataType: String
                    - name: firstName
                      description: First Name
                      dataType: String
                    - name: lastName
                      description: Last Name
                      dataType: String
                    - required: true
                      name: houseNameOrNumber
                      description: Housename or Number
                      dataType: String
                    - required: true
                      name: postalCode
                      description: Postal Code
                      dataType: String
                    - required: true
                      name: overseas
                      description: Overseas
                      dataType: Boolean
                  name: CreateGiftAidDeclaration
                - Parameters:
                    - required: true
                      name: closeDate
                      description: Close date of the Gift Aid Declaration
                      dataType: Date
                    - name: closeReason
                      description: Close Reason
                      dataType: String
                    - name: comments
                      description: Comments
                      dataType: String
                  name: CloseAllGiftAidDeclarations
    GetPackageActionsFailedResponse422:
      type: object
      required:
        - error_code
        - error_message
      properties:
        error_code:
          type: integer
          format: int32
          example: 999
        error_message:
          type: string
          example: >-
            An unexpected error occurred. Please contact FinDock Support for
            assistance.
    PaymentProcessor:
      type: object
      properties:
        Name:
          type: string
          description: The name of the payment processor.
          example: PaymentHub-SEPA
        IsDefault:
          type: boolean
          description: >
            Indicates whether this is the default payment processor for the
            payment method. If no payment processor is passed in a payment
            intent message, the default

            processor is used to process payments with this method.
          example: true
        Targets:
          type: array
          description: >
            The names of all targets (bank accounts) that are configured for
            this payment processor. Currently only

            targets for native FinDock processors are returned.
          example:
            - publicTarget: PaymentHub-SEPA
              Name: Main SEPA Account
            - publicTarget: PaymentHub-SEPA
              Name: Region One SEPA Account
            - publicTarget: PaymentHub-SEPA
              Name: Region Two SEPA Account
        SupportsRecurring:
          type: boolean
          description: >-
            Indicates if the payment processor supports recurring payments with
            this payment method.
          example: true
        InitialPaymentOnRecurring:
          type: string
          description: >
            Indicates whether the payment processor supports or requires an
            initial payment (OneTime object) for a recurring payment payment
            intent.

            This field replaces RecurringRequiresInitialPayment.
          enum:
            - required
            - optional
            - unsupported
          example: unsupported
        RecurringRequiresInitialPayment:
          type: boolean
          description: >-
            Old way to indicate of the payment processor requires an initial
            payment (OneTime object) for a recurring payment. Replaced by
            InitialPaymentOnRecurring.
          example: false
          deprecated: true
        Parameters:
          type: array
          description: >-
            API parameters available for the payment processor and method
            combination.
          items:
            type: object
            properties:
              Required:
                type: boolean
                description: Indicates if the parameter is required.
                example: true
              Name:
                type: string
                description: The name of the parameter.
                example: iban
              Description:
                type: string
                description: A description of the purpose of the parameter.
                example: The IBAN of the payer's bank account.
              DataType:
                type: string
                description: The data type of the parameter.
                example: String
        image:
          type: object
          description: URL to payment method logo that can used in front-end applications.
          properties:
            svg:
              example: >-
                https://external.findock.com/icon/payment-methods/sepadirectdebit.svg
    SourceConnector:
      type: object
      description: Source connector that can be used to process payment data in Salesforce.
      properties:
        Name:
          type: string
          description: >-
            The name of the [source
            connector](/docs/@production/source-connectors/index.md) used to
            register one-time and recurring payments, e.g. PaymentHub,
            FinDock-for-NPSP or FinDock-for-Fundraising.
          example: FinDock-for-Fundraising
        PrettyName:
          type: string
          description: The pretty name of the source connector package.
          example: Fundraising
        IsDefault:
          type: boolean
          description: >-
            Indicates if this is the default source connector. If no source
            connector is passed in the request, this source connector is used.
          example: true
    Contact:
      type: object
      properties:
        Id:
          type: string
          description: The unique GUID or Salesforce ID of the Contact record.
          example: 0031j00000baD73AAE
        SalesforceFields:
          type: object
          example:
            FirstName: Test
            LastName: Payment
            Email: test@findock.com
            MailingStreet: Any Street
            MailingCity: Any City
            MailingPostalCode: '00000'
            MobilePhone: 012-3456789
    Account:
      type: object
      properties:
        Id:
          type: string
          description: The unique GUID or Salesforce ID of the Account record.
          example: 0011j00000itNdlAAE
        RecordTypeName:
          type: string
          description: The Salesforce record type of the Account record.
          example: Household
        SalesforceFields:
          example:
            Name: Payment Family
            BillingStreet: Any Street
            BillingCity: Any City
            BillingPostalCode: '00000'
    Payment:
      type: object
      description: A cash movement related to an installment in Salesforce.
      properties:
        Id:
          type: string
          description: The Salesforce record Id of the Payment record."
          example: a0R3X00000V20tbUAB
        Url:
          type: string
          description: The Salesforce URL to the Payment record.
          example: /services/data/v65.0/sobjects/cpm__Payment__c/a0R3X00000V20tbUAB
        Type:
          type: string
          description: The Salesforce object type.
          example: cpm__Payment__c
        Target:
          description: >-
            The name of the target, a bank account or PSP merchant account,
            specified for the installment.
          example: PRIMARY-BANK-ACCOUNT
        PaymentProcessor:
          description: >-
            The name of the payment processor package used to process the
            installment.
          example: PaymentHub-SEPA
        PaymentMethod:
          description: The name of the payment method used by the installment.
          example: DirectDebit
        CollectionDate:
          type: string
          description: The date on which the payment transaction was completed.
          example: '2025-02-03'
        Amount:
          type: number
          description: The amount of the payment transaction.
          example: 25
    PaymentIntent:
      x-tags:
        - Payment Intent
      type: object
      description: >-
        Full range of content supported by POST actions to the PaymentIntent
        endpoint.
      properties:
        Id:
          type: string
          description: >-
            The Payment Intent Id of the Installment record you want to query.
            The Id can also be found on the related Inbound Report record.
          example: pi_1hubybk7nh45rvbt6
        Status:
          type: string
          description: >-
            The processing status of the inbound report for the queried payment
            intent.
          example: Matched
        IdempotencyKey:
          type: string
          description: >
            The Payment API supports idempotency for safely retrying requests
            without accidentally performing the same operation twice.

            This is useful when an API call is disrupted in transit and you do
            not receive a response. An idempotency key is a unique

            value generated by the client which the server uses to recognize
            subsequent retries of the same request. How you create

            unique keys is up to you, but we suggest using V4 UUIDs, or another
            random string with enough entropy to avoid collisions.
          example: 1hubybk7nh45rvbt6
        SuccessURL:
          type: string
          format: url
          description: >-
            The URL the payer is redirected to when a payment has been completed
            successfully.
          example: https://hostdomain.com/success
        FailureURL:
          type: string
          format: url
          description: >-
            The URL the user is redirected to when a payment has failed or was
            cancelled.
          example: https://hostdomain.com/failure
        RedirectURL:
          type: string
          format: url
          description: >
            The URL where the user should be redirected to so additional
            information can be provided to complete the payment.

            This is primarily used for hosted payment forms of PSPs.
          example: https://redirect-hostdomain.com/checkout/payment-parameters
        WebhookURL:
          type: string
          format: url
          description: >-
            URL where you want to receive [webhook
            notifications](/api/payment-api-v2/section/webhook-events-and-notifications)
            about the status of the payment.
          example: https://hostdomain.com/endpoint
        Origin:
          type: string
          description: >-
            The channel used to create the payment intent, such as a payment
            form on a webpage. This information can be used when building
            customized follow-up logic in Salesforce.
          example: Campaign payment form
        CampaignId:
          type: string
          description: >-
            Id of a Campaign record in Salesforce. When a valid value is passed,
            the campaign is linked to the installment or recurring payment
            object in Salesforce."
          example: 7013X000001mAZbQAM
        Payer:
          type: object
          description: >-
            Information about the payer captured in a new or existing Account
            and/or Contact record.
          anyOf:
            - $ref: '#/components/schemas/Account'
            - $ref: '#/components/schemas/Contact'
        OneTime:
          type: object
          description: >-
            Details for a new one-time payment. If paying an existing one-time
            payment (installment), only Id is needed.
          properties:
            Amount:
              type: number
              description: The amount collected (or disbursed).
              example: 10
            CurrencyISOCode:
              type: string
              description: >-
                A valid [ISO 4217 currency
                code](https://www.iso.org/iso-4217-currency-codes.html). May be
                required depending on the Salesforce org configuration.
              example: EUR
            Id:
              type: string
              description: The record Id or GUID of the existing installment to pay.
              example: a083X00001aUMCnQAO
            SalesforceFields:
              type: object
              description: >
                This SalesforceFields block is used to pass fields and values on
                the Installment object in Salesforce.

                To find out which fields are available, check the Object Manager
                in the Salesforce Setup.
              example:
                cpm__any_findock_or_package_field__c: Lorem Ipsum Dolor sit amet
                any_custom_object_link__c: 7010Y000000dDSQ
        Recurring:
          type: object
          description: >-
            The recurring block contains details for creating a new recurring
            payment or updated an existing one based on an Id.
          properties:
            Amount:
              type: number
              description: The amount to be collected at regular intervals.
              example: 10
            Frequency:
              type: string
              description: >
                The frequency with which installments are collected. e.g.
                'Weekly', 'Monthly'. The formatting of the frequency options

                depends on the source connector you provide in the payment
                intent message. Please adjust your values accordingly.
              example: Monthly
            CurrencyISOCode:
              type: string
              description: >-
                A valid [ISO 4217 currency
                code](https://www.iso.org/iso-4217-currency-codes.html). May be
                required depending on the Salesforce org configuration.
              example: EUR
            StartDate:
              type: string
              format: date
              description: >-
                The first date the recurring payment is collected. Format is
                yyyy-mm-dd.
              example: '2025-01-01'
            EndDate:
              type: string
              format: date
              description: >-
                The last date the recurring payment is collected. Format is
                yyyy-mm-dd.
              example: '2025-12-01'
            Id:
              type: string
              description: The record Id or GUID of the recurring payment to update.
              example: a0V3X00000S7BuCUAV
            SalesforceFields:
              type: object
              description: >
                This SalesforceFields block is used to pass fields and values on
                the recurring object in Salesforce.

                To find out which fields are available, check the Object Manager
                in the Salesforce Setup.
              example:
                cpm__any_findock_or_package_field__c: Lorem Ipsum Dolor sit amet
                any_custom_object_link__c: 7010Y000000dDSQ
        PaymentMethod:
          type: object
          description: The payment processing details for the one-time payment.
          properties:
            Name:
              type: string
              description: Name of the payment method.
              example: CreditCard
            Processor:
              type: string
              description: >
                Name of the FinDock package for the payment processor. If no
                processor is specified,

                FinDock uses the default processor configured for the payment
                method.
              example: PaymentHub-Stripe
            Target:
              type: string
              description: >
                The merchant account that gets the money from the payment. If no
                target is provided,

                FinDock uses whichever target that is set as the default in the
                payment processor configuration.
              example: Stripe-Main-Account
            Parameters:
              type: object
              description: >
                Additional parameters for the given payment method and processor
                combination. For details, please

                refer to processor-specific configuration articles.
              example:
                locale: en-GB
                description: Monthly membership fee
        Settings:
          type: object
          description: >
            Additional information on how the payment should be processed in
            Salesforce. Includes the source connector and additional parameters

            like `ProcessingType` that can be used for [Guided
            Matching](/docs/@production/reconciliation/what-is-guided-matching.md).
          properties:
            SourceConnector:
              type: string
              description: >
                The name of the source connector to use for processing, e.g.
                'PaymentHub', `PaymentHub-for-NPSP` or
                'FinDock-for-Fundraising'.

                If no source connector is passed in the request, the default
                source connector set in the FinDock configuration is used.
              example: PaymentHub-for-NPSP
            ProcessingType:
              type: string
              description: >
                The Sub Type name of the Inbound Report which determines the
                [Guided
                Matching](/docs/@production/reconciliation/what-is-guided-matching.md)

                setup which drives the data processing.
              example: CustomInboundReportSubType
        SalesforceFields:
          type: object
          description: >
            This SalesforceFields block is used to pass fields and values on the
            Installment object in Salesforce.

            To find out which fields are available, check the Object Manager in
            the Salesforce Setup.
          example:
            cpm__Campaign__c: a070Y000005M7t6
            cpm__Origin__c: Online payment form
        PackageActions:
          type: object
          description: >-
            Additional, package-specific actions to be performed with the
            payment intent.
          example:
            PaymentHub-GiftAid:
              CreateGiftAidDeclaration:
                dateMade: '2025-01-15'
                startDate: '2025-02-01'
                title: Mr.
                firstName: Test
                lastName: Donor
                houseNameOrNumber: 12
                postalCode: L68 0AQ
                acquisitionMethod: Digital
  examples:
    BasicOneTime:
      description: >-
        A simple payment intent payload for a one-time payment with minimum
        required information.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        OneTime:
          Amount: 50
    BasicRecurring:
      description: >-
        A simple payment intent payload for a recurring payment with minimum
        required information.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        Recurring:
          Amount: 25
          Frequency: Monthly
          StartDate: '2025-01-01'
          EndDate: '2025-12-01'
    BasicRecurringWithInitialPayment:
      description: >-
        A payment intent payload for a recurring payment that includes an
        initial one-time charge.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: CreditCard
          Processor: PaymentHub-Stripe
          Target: Stripe-Main
        OneTime:
          Amount: 25
        Recurring:
          Amount: 25
          Frequency: Monthly
          StartDate: '2025-01-01'
          EndDate: '2025-12-01'
    BasicPayExistingInstallmentWithId:
      description: >-
        A payment payload intent for paying an existing installment using the
        installment record Id for reference.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        OneTime:
          Id: a083X00001aUMCnQAO
    BasicPayExistingInstallmentWithGUID:
      description: >-
        A simple payment intent payload for paying an existing installment using
        the installment GUID for reference.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        OneTime:
          Id: sdfasdf-asfads-242134-adsfadf-23423
    AdvancedWithWebhook:
      description: >-
        A payment intent payload for a one-time payment with a URL for webhook
        notifications.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        OneTime:
          Amount: 50
        WebhookURL: https://hostdomain.com/api/endpoint
    AdvancedWithOverrideProcessor:
      description: >-
        A payment intent payload for a one-time payment that overrides the
        default payment processor for the payment method.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
          Processor: PaymentHub-SEPA
        OneTime:
          Amount: 50
    AdvancedWithNonDefaultTarget:
      description: >-
        A payment intent payload for a one-time payment that overrides the
        default target for payment method and its default payment processor.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
          Target: Region One Account
        OneTime:
          Amount: 50
    AdvancedWithFullContactAndAccount:
      description: >-
        A payment intent payload for a one-time payment that includes details to
        create (after deduplication) of Contact and Account records for the
        payer.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            RecordTypeName: Donor
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
          Account:
            RecordTypeName: Household
            SalesforceFields:
              Name: Payer Family
              BillingStreet: Any Street
              BillingCity: Any City
              BillingPostalCode: '00000'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        OneTime:
          Amount: 50
    AdvancedWithOriginCampaign:
      description: >-
        A payment intent payload for a one-time payment that includes the origin
        (channel) of the payment and associates the payment with a specific
        campaign in Salesforce.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        OneTime:
          Amount: 25
        Origin: Company website default payment form
        CampaignId: 7013X000001mAZbQAM
    AdvancedWithOneTimeSFFields:
      description: >-
        A payment intent payload for a one-time payment that includes additional
        information in Salesforce fields on the Installment record.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        OneTime:
          Amount: 50
          SalesforceFields:
            cpm__any_findock_or_package_field__c: Lorem Ipsum Dolor sit amet
            any_custom_object_link__c: 7010Y000000dDSQ
    AdvancedWithRecurringSFFields:
      description: >-
        A payment intent payload for a recurring payment that includes
        additional information in Salesforce fields on the recurring record.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        Recurring:
          Amount: 25
          Frequency: Monthly
          StartDate: '2025-01-01'
          EndDate: '2025-12-01'
          SalesforceFields:
            cpm__any_findock_or_package_field__c: Lorem Ipsum Dolor sit amet
            any_custom_object_link__c: 7010Y000000dDSQ
    AdvancedWithInboundReportSFFields:
      description: >
        A payment intent payload for a one-time payment that includes additional
        information to add to Salesforce fields on the Inbound Report record,

        for example, to handle business-specific reconciliation logic.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        OneTime:
          Amount: 50
        SalesforceFields:
          cpm__CustomField1__c: Development Project fund
          cpm__CustomField2__c: Direct outreach
    AdvancedWithPackageActions:
      description: >
        A payment intent message for a one-time donation that also creates a new
        Gift Aid Declaration record for the donor. The package action is
        available

        in orgs with the FinDock source connector for Gift Aid. 
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        OneTime:
          Amount: 50
        PackageActions:
          PaymentHub-GiftAid:
            CreateGiftAidDeclaration:
              dateMade: '2019-11-15'
              startDate: '2020-01-01'
              endDate: '2020-12-31'
              firstName: Test
              lastName: Payer
              houseNameOrNumber: '12'
              postalCode: L68 0AQ
              overseas: false
              acquisitionMethod: Digital
    AdvancedWithMultiCurrency:
      description: >-
        A payment intent payload for a recurring payment in a multi-currency org
        that explicitly passes the payment currency.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        Recurring:
          Amount: 25
          Frequency: Monthly
          StartDate: '2025-01-01'
          EndDate: '2025-12-01'
          CurrencyISOCode: EUR
    AdvancedWithIdempotencyKey:
      description: >-
        A payment intent payload that includes an idempotency key for the
        one-time payment to ensure the payment intent cannot be duplicated.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
        OneTime:
          Amount: 10
        IdempotencyKey: 1hubybk7nh45rvbt6
    AdvancedWithSourceAndMatchingSetup:
      description: >
        A payment intent message that sets the source (e.g. to override the
        default source connector) specific a special Inbound Report sub type to
        use

        for matching and reconciliation rather than the default sub type for
        payment intent inbound reports provided by FinDock.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Payer:
          Contact:
            SalesforceFields:
              FirstName: Test
              LastName: Payer
              Email: test@findock.com
              MailingStreet: Any Street
              MailingCity: Any City
              MailingPostalCode: '00000'
              MobilePhone: '0123456789'
        PaymentMethod:
          Name: CreditCard
          Processor: PaymentHub-Stripe
          Target: Stripe-Main
        OneTime:
          Amount: 50
        Settings:
          SourceConnector: PaymentHub-for-NPSP
          ProcessingType: CustomInboundReportSubType
    UpdateRecurringMethod:
      description: >-
        A payment intent payload to change the payment method of an existing
        recurring payment.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Recurring:
          Id: a0V3X00000S7BuCUAV
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
    UpdateRecurringMethodProcessor:
      description: >-
        A payment intent payload to change the payment method and processor of
        an existing recurring payment.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Recurring:
          Id: a0V3X00000S7BuCUAV
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
          Processor: PaymentHub-SEPA
    UpdateRecurringMethodProcessorTarget:
      description: >-
        A payment intent payload to change the payment method and target of an
        existing recurring payment.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Recurring:
          Id: a0V3X00000S7BuCUAV
        PaymentMethod:
          Name: DirectDebit
          Parameters:
            iban: NL13TEST0123456789
            holderName: Test Payer
          Target: PRIMARY-BANK-ACCOUNT
    UpdateRecurringMethodWithInitialPayment:
      description: >
        A payment intent payload to change the payment method of an existing
        recurring payment to a method that requires an initial charge,

        like changing from direct debit to credit card.
      dataValue:
        SuccessURL: https://hostdomain.com/success
        FailureURL: https://hostdomain.com/failure
        Recurring:
          Id: a0V3X00000S7BuCUAV
        OneTime:
          Amount: 1
        PaymentMethod:
          Name: CreditCard
          Processor: PaymentHub-Stripe
          Target: Stripe-Main
