Input XML File for PAIN.001.001.03
This page contains a description of the input XML file for the PAIN.001.001.03 format, which is used for Payment batch files.
The following is a high-level example of a PAIN.001.001.03 input XML file:
<?xml version="1.0" encoding="UTF-8" ?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CstmrCdtTrfInitn>
<GrpHdr>
...
</GrpHdr>
<PmtInf>
...
</PmtInf>
<PmtInf>
...
</PmtInf>
</CstmrCdtTrfInitn>
</Document>
Full example can be found here.
The root document tag for the input file is CstmrCdtTrfInitn. It contains a Group Header and at least one Payment Information building block (corresponding to a batch). The Group Header contains metadata that relates to all the batches in the file. Each batch contains meta data for all the transactions within.
Group Header (GrpHdr)
Your XML Input file must include a group header using the GrpHdr building block. This building block is only present once in a file and contains a set of characteristics shared by all the individual instructions included in the message.
<GrpHdr>
<MsgId>ABC123</MsgId>
<CreDtTm>2023-05-15T17:12:44</CreDtTm>
<NbOfTxs>5</NbOfTxs>
<CtrlSum>123.56</CtrlSum>
<InitgPty>
...
</InitgPty>
</GrpHdr>
Here's an explanation of the different tags in the GrpHdr block as shown above:
- MsgId: An ID number for the message. Note:
MsgId
must be unique in each file. This element is required. - CreDtTm: The date and time the payment instruction was created. Note: The date can not be in the future. This element is required.
- NbOfTxs: The total number of transaction instruction blocks in the message. Each instruction corresponds to one transaction, and will form a separate instruction block. For more information on the instruction blocks, see the Credit Transfer Transaction Information section below. Note: This element is required.
- CtrlSum: The total amount (as a number) of all the instructions included in the file, irrespective of currencies, used as a control sum. Control sum is validated and it needs to match the sum of all transactions amounts Note: Bankera currently supports EUR only. This element is required.
- InitgPty: Indicates the party initiating the transfer (debtor). See the Initiating Party section that follows for more details on the tags inside the InitgPty block. Note: This element is required.
Initiating Party (InitgPty)
The Initiating Party is the party initiating the payment (the debtor).
<InitgPty>
<Nm>Name Surname</Nm>
</InitgPty>
Here's an explanation of the InitgPty block as shown above:
- Nm: Name by which the initiating party is known and which is usually used to identify that party. Note: This element is required.
Payment Information (PmtInf)
The PmtInf block contains payment information per batch in your file. You must include at least one PmtInf block in your file. In most cases the input file contains only one PmtInf block, with one set of payment instructions. This enables you to indicate general properties (such as execution date, debtor, payment type and debited account) once at the level of the PmtInf block.
You might want to use multiple PmtInf blocks if the file includes instructions to debit more than one account. In that case, you need a PmtInf block for each account that is going to be debited.
<PmtInf>
<PmtInfId>1234567</PmtInfId>
<PmtMtd>TRF</PmtMtd>
<NbOfTxs>1</NbOfTxs>
<CtrlSum>7.01</CtrlSum>
<PmtTpInf>
...
</PmtTpInf>
<ReqdExctnDt>2023-05-19</ReqdExctnDt>
<Dbtr>
...
</Dbtr>
<DbtrAcct>
...
</DbtrAcct>
<DbtrAgt>
...
</DbtrAgt>
<CdtTrfTxInf>
...
</CdtTrfTxInf>
</PmtInf>
Below is an explanation of the different top-level tags and blocks found in the PmtInf block as shown above. These tags and blocks appear once for each PmtInf block, except for the CdtTrfTxInf block, which can appear multiple times, representing multiple transactions. Each of the other tags and blocks applies to all CdtTrfTxInf blocks that appear in the PmtInf block:
- PmtInf: This block contains payment information, such as debtor and payment type information. You can use this block repeatedly within the same input file. Note: One or more instances of the PmtInf element is required.
- PmtInfId: The unique ID number for this batch, which is assigned by the originating party. Note: This element is required.
- PmtMtd: Payment Method. Bankera currently supports only TRF (Transfer advice) Note: This element is required.
- NbOfTxs: The number of transactions within this batch. Note: This element is required.
- CtrlSum: The sum total of all instructions within this batch, irrespective of currencies, used as a control sum. Note: Bankera currently supports "EUR" only. This element is required.
- PmtTpInf: The Payment Type Information block. See the Payment Type Information section below for more details on the PmtTpInf block. Note: This element is required.
- ReqdExctnDt: Requested Execution Date. The date on which the originator's account is to be debited. Date can not be older than today. Note: This element is required.
- Dbtr: Debtor block. Contains the name and postal address of the originator. See the Debtor section below for an example of the Dbtr block. Note: This element is required.
- DbtrAcct: Debtor Account. The account of the originator that will be debited. See the Debtor Account section below for more details on the DbtrAcct block. Note: This element is required.
- DbtrAgt: Debtor Agent block. Details on the debtor's financial institution. See the Debtor Agent section below for more details on the DbtrAgt block. Note: This element is required.
- CdtTrfTxInf: Credit Transfer Transaction Information. Includes elements related to the credit side of the transaction, such as creditor and remittance information. This block can appear multiple times within the same PmtInf block. See the Credit Transfer Transaction Information section below for more details on the CdtTrfTxInf block. Note: One or more of the CdtTrfTxInf element is required.
Payment Type Information (PmtTpInf)
The PmtTpInf block contains information on the payment type.
<PmtTpInf>
<SvcLvl>
<Cd>SEPA</Cd>
</SvcLvl>
</PmtTpInf>
Here's an explanation of the different tags in the PmtTpInf block as shown in the examples above.
- SvcLvl: Service Level. Note: This element is required.
- Cd: Code. Payment system, Bankera currently only accepts only SEPA payments via payment batch. Note: This element is required.
Debtor (Dbtr)
The Dbtr block contains information on the name and postal address of the originator (debtor).
<Dbtr>
<Nm>Name Other Surname</Nm>
<PstlAdr>
<StrtNm>Gediminas av. 5</StrtNm>
<PstCd>01230</PstCd>
<TwnNm>Vilnius</TwnNm>
<CtrySubDvsn>Vilnius</CtrySubDvsn>
<Ctry>LT</Ctry>
</PstlAdr>
</Dbtr>
- Nm: Debtor name. Note: this element is required
- PstlAdr: A block containing the postal address tags of the debtor.
- StrtNm: Street name
- PstCd: Post code
- TwnNm: City/Town name
- CtrySubDvsn: State
- Ctry: Country Alpha-2 letter code
Debtor Account (DbtrAcct)
The DbtrAccount block contains information on the account of the originator that will be debited.
<DbtrAcct>
<Id>
<IBAN>LT163550020000000882</IBAN>
</Id>
</DbtrAcct>
Here's an explanation of the different tags in the DbtrAccount block as shown above:
- Id: The sub-block containing the debtor's account identification information. Note: This element is required.
- IBAN: International Bank Account Number. Note: This element is required.
Debtor Agent (DbtrAgt)
The DbtrAgt block contains information on the originator's financial institution.
<DbtrAgt>
<FinInstnId>
<BIC>UAPELT22XXX</BIC>
</FinInstnId>
</DbtrAgt>
Here's an explanation of the different tags in the DbtrAgt block as shown above:
- FinInstnId: Financial Institution Identification sub-block. Note: This element is required.
- BIC: Financial Institution BIC (Business Identifier code). Note: This element is required.
Credit Transfer Transaction Information (CdtTrfTxInf)
The CdtTrfTxInf block includes elements related to the credit side of the transaction, such as creditor and remittance information for the transaction. You can use this block repeatedly within the same PmtInf block. The number of occurrences of the CdtTrfTxInf block within a file is indicated by the NbOfTxs field in the Group Header (GrpHdr).
<CdtTrfTxInf>
<PmtId>
<EndToEndId>000020</EndToEndId>
</PmtId>
<Amt>
<InstdAmt Ccy="EUR">16.95</InstdAmt>
</Amt>
<Cdtr>
<Nm>1st Beneficiary name</Nm>
</Cdtr>
<CdtrAcct>
<Id>
<IBAN>LT103550010000000166</IBAN>
</Id>
</CdtrAcct>
<RmtInf>
<Ustrd>Payment reference</Ustrd>
</RmtInf>
</CdtTrfTxInf>
Here's an explanation of the different tags in the CdtTrfTxInf block as shown above:
- PmtId: Payment Identification sub-block. Provides identifying information regarding the transaction in child elements. Note: This element is required.
- EndToEndId: End to End Identification: End-to-end reference number of the credit transfer. This information is sent to the beneficiary. Note: This element is required.
- Amt: Amount sub-block. Contains the transaction amount in a child element. Note: This element is required.
- InstdAmt: Instructed Amount. The amount of the credit transfer in the indicated currency. Note: This element is required.
- Ccy: ISO currency code of the beneficiary account. Note: This element is required and only "EUR" is currently accepted.
- InstdAmt: Instructed Amount. The amount of the credit transfer in the indicated currency. Note: This element is required.
- Cdtr: The creditor sub-block. Contains details on the creditor for the transaction. Note: This element is required.
- Nm Creditor name Note: This element is required.
- CdtrAcct: Creditor account sub-block for the transaction, containing the creditor account number and currency in its child elements. Note: This element is required.
- Id: Identification sub-block. Contains an identification of the creditor's account in child elements. Note: This element is required.
- IBAN: International Bank Account Number. Note: This element is required.
- Id: Identification sub-block. Contains an identification of the creditor's account in child elements. Note: This element is required.
- RmtInf: The remittance information to send along with the transaction (payment details). Note: This element is required.
- Ustrd: Unstructured description of the transaction. Note: This element is required.