## E-mandates for SEPA Direct Debit

This feature is in a closed pilot and only for customers with accounts at specific Dutch banks. Please contact [FinDock Support](mailto:support@findock.com) if you would like to participate.

FinDock is introducing e-mandate support for native processing of SEPA Direct Debit payments. The digitally signed e-mandates are stored in Salesforce in accordance with the SEPA rulebook.

**Prerequisites**

* FinDock installed and configured
* WebHub connected
* SEPA extension installed and configured
* SEPA merchant account (target) is at ING
* Your ING account has [direct debit authorization](https://www.ing.nl/zakelijk/geld-ontvangen/incasso/incassomachtiging/incassomachtigen)


Your bank will need to help you set up the Incassomachtigen service. The bank creates a merchant account for you in the Worldline environment used by Incassomachtigen. Then, you need  select FinDock as **Aansluitmethode** in your merchant account settings,

**Limitations**

* Digital signing through [Incassomachtigen](https://www.incassomachtigen.nl/)
* Only select banks in the Netherlands
* Only for new direct debits set up through Giving Pages, PayLinks or Payment API


## Setting up SEPA e-mandates

FinDock needs to include a Merchant ID in callouts to the Incassomachtigen service. When the e-mandate feature is enabled in your org, a **Merchant Id** setting is added to [SEPA targets](/docs/payment-processors/configuring-sepa-dd#add-sepa-targets). This setting needs to be configured before you can use SEPA e-mandates.

The Merchant ID value identifies the creditor organization that is acquiring the e-mandate signature. For the Incassomachtigen service, the value is a 10-digit numeric identifier. Please inquire directly from your bank to get your assigned Merchant ID.

## SEPA payments with e-mandates

The e-mandate requirement for new one-time and recurring SEPA Direct Debit payments is controlled by the Payment API parameter `signatureType`. Currently the only supported value is `incassomachtigen`.

When set, the API parameter `issuer` also becomes automatically mandatory. This parameter determines the BIC, which is required for the e-mandate authorization process with Incassomacthigen.

Please also note that IBAN and Holder Name are also mandatory for SEPA e-mandates. However, FinDock gets these values from the resulting pain.012 data rather than the payment intent.

After setting up and validating the new payment intent with `signatureType = incassomachtigen`, FinDock generates a pain.009 file and sends this to Incassomachtigen for authorization. The payer is automatically redirected to a digital signature procedure based on an authorization URL from Incassomachtigen.

Once the authorization is completed, the payer is redirected back to the merchant-defined URL. FinDock immediately starts polling Incassomachtigen for e-mandate status updates. When FinDock receives the pain.012 file, the entire content is saved on the Mandate record for long-term storage.

| Payment intent without e-mandate | Payment intent with e-mandate |
|  --- | --- |
| `holderName` and `iban` mandatory
```json
{
...
"PaymentMethod": {
  "Name": "Direct Debit",
  "Processor": "PaymentHub-SEPA",
  "Target": "Test-Target",
  "Parameters": {
    "holderName": "John Parker",
    "iban": "**some IBAN**"
    }
  },
...
}
```
 | `signatureType` included; only `issuer` mandatory
```json
{
...
"PaymentMethod": {
  "Name": "Direct Debit",
  "Processor": "PaymentHub-SEPA",
  "Target": "Test-Target",
  "Parameters": {
    "signatureType": "incassomachtigen",
    "issuer": "ABNANL2A"
    }
  },
...
}
```
 |


## Collecting SEPA payments with e-mandates

One-time and recurring SEPA Direct Debit payments with e-mandates are collected through payment schedules following standard manual or automated procedures.

When e-mandates are involved, additional information is added to the generated pain.008 file, specifically, the ElctrncSgntr element under MndtRltdInf. This value is taken from the Electronic Signature field of the Mandate record.

## Pain.012 data for e-mandates

FinDock uses the following data to create e-mandates and related payment profiles.

| Object | Field | Pain.012 element | Comments |
|  --- | --- | --- | --- |
| Mandate | Date Signed | `<createDateTimestamp>` |  |
| Mandate | Electronic Signature | `<Prtry>` |  |
| Mandate | None - attached as file | Full pain.012 content and electronic signature | Mandatory to store this as proof in case of disputes |
| Mandate | Reference | `<MndtId>` |  |
| Mandate | Status | N/A | Controlled by FinDock processing logic |
| Mandate | Status Reason | eMandate.Reason or Mandate.AmendmentReason |  |
| Mandate | Type | `<SeqTp>` (under `<Dbtr>`) | OOF or RCUR |
| Payment Profile | BIC Code | `<BICFI>` (under `<Dbtr>`) |  |
| Payment Profile | Holder Name | `<Nm>` (under `<Dbtr>`) |  |
| Payment Profile | IBAN | `<IBAN>` |  |
| Payment Profile | Record Type | IBAN RecordType Id | Defined in Salesforce |