# Pain.009

The pain.009 message defined by [ISO 20022](https://www.iso20022.org/iso-20022-message-definitions) is used to submit (initiate) new mandates for registration to Italian banks using the [SEDA](/docs/payment-processors/seda-for-sepa) scheme. The pain.009 file is generated by mandate schedules.

FinDock follows the Associazione Bancaria Italiana message specifications which are based on pain.009.001.02.

## Pain.009 file structure

The pain.009 file in a simple XML with two sections:

* Group header node
* Amendment details node


## Pain.009 field mapping

The following table outlines how Salesforce data is mapped to pain.009 elements of the parent Mandate Initiation Request (MndtInitnReq) message.

### Group Header node

The Group Header (GrpHdr) node includes details covering the entire scope of the file.

| Object | Field | Pain.009 element | Further info |
|  --- | --- | --- | --- |
| Mandate | Mandate Id | MsgId | - |
| N/A | N/A | CreDtTm | Time file was generated, Y-m-d\TH:i:s |


### Mandate Details node

The Mandate Details (Mndt) node includes details about the mandate that needs to be registered and the creditor initiating the request.

| Object | Field | Pain.009 element | Further info |
|  --- | --- | --- | --- |
| Mandate | Mandate Id | Mndt / MndtId | - |
| Mandate | Mandate Id | Mndt / MndtReqId | - |
| N/A | N/A | Mndt / Tp / SvcLvl / Prtry | N/A, always `CMF` |
| N/A | N/A | Mndt / Tp / LclInstrum / Prtry | N/A, always `CORSEDPM` |
| Mandate | Type | Mndt / Ocrncs / SeqTp | `RCUR` (recurring) or `OOFF` (one-time) |
| Mandate | Date Signed | Mndt / Drtn / FrDt | - |
| N/A | Creditor Id | Mndt / CdtrSchmeId / Id / OrgId / Othr / Id | From target on mandate schedule |
| N/A | Company Name | Mndt / Cdtr / Nm | From target on mandate schedule |
| N/A | Bank Account Addition | Mndt / CdtrAgt / FinInstnId / BICFI | From target on mandate schedule |
| Mandate | Account Holder Name | Mndt / Dbtr / Nm | - |
| Mandate | Tax Code | Mndt / Dbtr / Id / PrvtId / Othr / Id | - |
| Mandate | IBAN | Mndt / DbtrAcct / Id / IBAN | - |
| Mandate | Mandate Id | OrgnlMndt / OrgnlMndt / MndtId | - |
| N/A | Company Name | OrgnlMndt / OrgnlMndt / Cdtr / Nm | From target on mandate schedule |