Skip to content

CBI compatibility #34

@aster94

Description

@aster94

Hello,

I would like to have compatibility with the CBI standard, which is derived from the ISO20022 pain.001.001.03

These are some useful files and links:
STIP-ST-001 Credit Transfer CBI v.00.04.00.xls

SEPA Single Euro Payments Area.pdf

https://remote.cedbrianteo.it/PagheWEB/help/infinity/ITA/mergedProjects/Infinity_PagheWeb/intro/intro_tracciati_record_accredito_netti.htm

Needed:

  1. add a new schemas for validation of the standard: https://github.com/raphaelm/python-sepaxml/tree/master/sepaxml/schemas
    Here there is a schema which could be used to ease the work: https://github.com/linkmesrl/cbi/blob/master/lib/xsd/CBIPaymentRequest.00.04.00.xsd
  2. add tests: https://github.com/raphaelm/python-sepaxml/tree/master/tests
  3. add support (for both SEPA and CBI) for Structured Credit Transfer Transaction Information (tag: 'Strd'), right now only Unstructured (Ustrd) is supported

This is a test xml downloaded from my bank with some parameter hidden for privacy:

<?xml version="1.0" encoding="utf-8"?>
<DEF:CBIBdyPaymentRequest
	xmlns="urn:CBI:xsd:CBIBdyPaymentRequest.00.04.00"
	xmlns:DEF="urn:CBI:xsd:CBIBdyPaymentRequest.00.04.00"
	xmlns:PMRQ="urn:CBI:xsd:CBIPaymentRequest.00.04.00"
	xmlns:SGNT="urn:CBI:xsd:CBISgnInf.001.04">
	<DEF:CBIEnvelPaymentRequest>
		<DEF:CBIPaymentRequest>
			<PMRQ:GrpHdr>
				<PMRQ:MsgId>unique id</PMRQ:MsgId>
				<PMRQ:CreDtTm>2021-04-14T00:00:00</PMRQ:CreDtTm>
				<PMRQ:NbOfTxs>1</PMRQ:NbOfTxs>
				<PMRQ:CtrlSum>36.60</PMRQ:CtrlSum>
				<PMRQ:InitgPty>
					<PMRQ:Id>
						<PMRQ:OrgId>
							<PMRQ:Othr>
								<PMRQ:Id>id</PMRQ:Id>
								<PMRQ:Issr>CBI</PMRQ:Issr>
							</PMRQ:Othr>
						</PMRQ:OrgId>
					</PMRQ:Id>
				</PMRQ:InitgPty>
			</PMRQ:GrpHdr>
			<PMRQ:PmtInf>
				<PMRQ:PmtInfId>unique id</PMRQ:PmtInfId>
				<PMRQ:PmtMtd>TRA</PMRQ:PmtMtd>
				<PMRQ:PmtTpInf>
					<PMRQ:InstrPrty>NORM</PMRQ:InstrPrty>
					<PMRQ:SvcLvl>
						<PMRQ:Cd>SEPA</PMRQ:Cd>
					</PMRQ:SvcLvl>
				</PMRQ:PmtTpInf>
				<PMRQ:ReqdExctnDt>2021-04-13</PMRQ:ReqdExctnDt>
				<PMRQ:Dbtr>
					<PMRQ:Nm>we</PMRQ:Nm>
					<PMRQ:PstlAdr>
						<PMRQ:AdrLine>our address</PMRQ:AdrLine>
						<PMRQ:AdrLine>another line</PMRQ:AdrLine>
					</PMRQ:PstlAdr>
				</PMRQ:Dbtr>
				<PMRQ:DbtrAcct>
					<PMRQ:Id>
						<PMRQ:IBAN>my iban</PMRQ:IBAN>
					</PMRQ:Id>
				</PMRQ:DbtrAcct>
				<PMRQ:DbtrAgt>
					<PMRQ:FinInstnId>
						<PMRQ:ClrSysMmbId>
							<PMRQ:MmbId>bank code</PMRQ:MmbId>
						</PMRQ:ClrSysMmbId>
					</PMRQ:FinInstnId>
				</PMRQ:DbtrAgt>
				<PMRQ:ChrgBr>SLEV</PMRQ:ChrgBr>
				<PMRQ:CdtTrfTxInf>
					<PMRQ:PmtId>
						<PMRQ:InstrId>1</PMRQ:InstrId>
						<PMRQ:EndToEndId>unique id</PMRQ:EndToEndId>
					</PMRQ:PmtId>
					<PMRQ:PmtTpInf>
						<PMRQ:CtgyPurp>
							<PMRQ:Cd>SUPP</PMRQ:Cd>
						</PMRQ:CtgyPurp>
					</PMRQ:PmtTpInf>
					<PMRQ:Amt>
						<PMRQ:InstdAmt Ccy="EUR">36.60</PMRQ:InstdAmt>
					</PMRQ:Amt>
					<PMRQ:Cdtr>
						<PMRQ:Nm>my supplier</PMRQ:Nm>
						<PMRQ:PstlAdr>
							<PMRQ:StrtNm>supplier address</PMRQ:StrtNm>
						</PMRQ:PstlAdr>
						<PMRQ:Id>
							<PMRQ:OrgId>
								<PMRQ:Othr>
									<PMRQ:Id>supplier vat number</PMRQ:Id>
								</PMRQ:Othr>
							</PMRQ:OrgId>
						</PMRQ:Id>
					</PMRQ:Cdtr>
					<PMRQ:CdtrAcct>
						<PMRQ:Id>
							<PMRQ:IBAN>supplier iban</PMRQ:IBAN>
						</PMRQ:Id>
					</PMRQ:CdtrAcct>
					<PMRQ:RmtInf>
						<PMRQ:Strd>
							<PMRQ:RfrdDocInf>
								<PMRQ:Tp>
									<PMRQ:CdOrPrtry>
										<PMRQ:Cd>CINV</PMRQ:Cd>
									</PMRQ:CdOrPrtry>
								</PMRQ:Tp>
								<PMRQ:Nb>test string</PMRQ:Nb>
								<PMRQ:RltdDt>2021-04-26</PMRQ:RltdDt>
							</PMRQ:RfrdDocInf>
							<PMRQ:RfrdDocAmt>
								<PMRQ:CdtNoteAmt Ccy="EUR">36.60</PMRQ:CdtNoteAmt>
							</PMRQ:RfrdDocAmt>
						</PMRQ:Strd>
					</PMRQ:RmtInf>
				</PMRQ:CdtTrfTxInf>
			</PMRQ:PmtInf>
		</DEF:CBIPaymentRequest>
	</DEF:CBIEnvelPaymentRequest>
</DEF:CBIBdyPaymentRequest>

This issue is pubblished on bountysource
I am able to run tests to check if generated xml file are correctly accepted by my bank

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions