agritheory / check_run

Payables utility for ERPNext
https://agritheory.com/documentation/check_run/
Other
28 stars 25 forks source link

XML File for SEPA Payments #230

Open basawaraj-fosserp opened 4 months ago

basawaraj-fosserp commented 4 months ago

Companies located in the EU+ can process Euro payments to business partners located in EU+ via SEPA (Single Euro Payments Area) payment mechanism. All the information required like recepient's bank information, address, etc can be included in the SEPA XML file.

The XML file should contain mainly three parts: Message Root, Group Header Elements and Payment Information Elements.

For each Check Run a XML file can be generated.

Message Root:

<?xml version="1.0" encoding="UTF-8"?>
<!-- SEB ISO 20022 V03 MIG, 6.1 SEPA CT IBAN ONLY -->
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <CstmrCdtTrfInitn>

Group Header Elements:

<GrpHdr>
    <MsgId>ABC/060928/CCT001</MsgId>
    <CreDtTm>2021-01-21T17:34:47-05:00</CreDtTm>
    <NbOfTxs>1</NbOfTxs>
    <CtrlSum>100.00</CtrlSum>
    <InitgPty>
        <Nm>PAYMENTS</Nm>
        <Id>
            <OrgId>
                <Othr>
                    <Id>55667788990011</Id>
                    <SchmeNm>
                        <Cd>BANK</Cd>
                    </SchmeNm>
                </Othr>
            </OrgId>
        </Id>
    </InitgPty>
</GrpHdr>

Payment Information Elements:

<PmtInf>
    <PmtInfId>ABC/4560/2008-09-25</PmtInfId>
    <PmtMtd>TRF</PmtMtd>
    <BtchBookg>false</BtchBookg>
    <NbOfTxs>1</NbOfTxs>
    <CtrlSum>100.00</CtrlSum>
    <PmtTpInf>
        <SvcLvl>
            <Cd>SEPA</Cd>
        </SvcLvl>
    </PmtTpInf>
    <ReqdExctnDt>2021-01-21</ReqdExctnDt>
    <Dbtr>
        <Nm>PAYMENTS</Nm>
        <Id>
            <OrgId>
                <Othr>
                    <Id>55667788990011</Id>
                    <SchmeNm>
                        <Cd>BANK</Cd>
                    </SchmeNm>
                </Othr>
            </OrgId>
        </Id>
        <CtryOfRes>SE</CtryOfRes>
    </Dbtr>
    <DbtrAcct>
        <Id>
            <IBAN>DE2220000000055118898229</IBAN>
        </Id>
        <Ccy>EUR</Ccy>
    </DbtrAcct>
    <DbtrAgt>
        <!-- Note: For IBAN only on Debtor side use Othr/Id: NOTPROVIDED - see below -->
        <FinInstnId>
            <Othr>
                <Id>NOTPROVIDED</Id>
            </Othr>
        </FinInstnId>
    </DbtrAgt>
    <ChrgBr>SLEV</ChrgBr>
    <CdtTrfTxInf>
        <PmtId>
            <InstrId>SEPACT1-2</InstrId>
            <EndToEndId>SEPACT1-2</EndToEndId>
        </PmtId>
        <Amt>
            <InstdAmt Ccy="EUR">100.00</InstdAmt>
        </Amt>
        <!-- Note: Creditor Agent should not be used at all for IBAN only on Creditor side -->
        <Cdtr>
            <Nm>European Payments Council</Nm>
        </Cdtr>
        <CdtrAcct>
            <Id>
                <IBAN>DE10310101725402</IBAN>
            </Id>
        </CdtrAcct>
        <RgltryRptg>
            <DbtCdtRptgInd>DEBT</DbtCdtRptgInd>
            <Dtls>
                <Cd>101</Cd>
            </Dtls>
        </RgltryRptg>
        <RmtInf>
            <Ustrd>Invoice 11111</Ustrd>
        </RmtInf>
    </CdtTrfTxInf>
</PmtInf>

Ref: https://docs.oracle.com/cd/E16582_01/doc.91/e15104/fields_sepa_pay_file_appx.htm

agritheory commented 4 months ago

@basawaraj-fosserp This seems like a great feature and is a good parallel to the NACHA features. I think it makes sense to move this onto a separate tab with dedicated export options and tracking.