Bank Integration Service - Zynergy Requirements
This document outlines what data Zynergy needs from a Bank Integration Service and proposes a schema structure.
All payment formats currently supported by Zynergy were analyzed to ensure the proposed schema can accommodate them, with an extensions mechanism for format-specific data.
1. Payment Formats
Zynergy processes the following payment file formats:
- BGMax
- TotalIn
- Inbetalningsservice OCR
- ISO 20022 camt.054 (Nordea, Swedbank)
- Autogiro
- OCR Giro
- Betalingsservice
- Leverandorservice
- EDI Light
- OCR Kortart71
- OFUXML (international transfers)
2. What Zynergy Needs
The schema follows a three-level hierarchy: file (metadata and duplicate detection), headers (payment batches with shared properties), and transactions (individual payments).
2.1 File-Level Fields
These fields identify the file and enable duplicate detection:
| Field | Purpose |
|---|---|
file.uniqueId | SHA-256 hash of file content for duplicate detection |
file.timestamp | When file was created/generated |
file.format | Format identifier for routing |
file.provider | Bank/provider name |
2.2 Required Fields
These fields are essential for Zynergy to process and reconcile payments:
| Field | Purpose | Source Examples |
|---|---|---|
transactionId | Unique identifier for the payment transaction (bank-assigned or payer-provided) | ISO20022: EndToEndId / AcctSvcrRef, BGMax: TransactionSerialNumber |
references | Array of invoice references/OCRs for matching* | ISO20022: CdtrRefInf.Ref / RfrdDocInf.Nb |
amount | Payment amount (negative for refunds**) | ISO20022: RmtdAmt |
currency | ISO currency code | ISO20022: Ccy |
paymentDate | When payment was recorded (booking date) | ISO20022: BookgDt |
receivingAccount | Destination bank account | ISO20022: CdtrAcct, Autogiro: bankgiro number |
messages | Free-text payment information (payers sometimes put reference here) | ISO20022: Ustrd / AddtlRmtInf |
payer | Payer information object (all sub-fields nullable) | See below |
payer.id | Payer identification | ISO20022: Dbtr.Id, Autogiro: payer number, BGMax/TotalIn: LegalIdentityNumber |
payer.name | Payer's full name | ISO20022: Dbtr.Nm |
payer.address | Payer's address (structured or string) | ISO20022: Dbtr.PstlAdr |
payer.country | Payer's country code | ISO20022: Dbtr.PstlAdr.Ctry |
payer.bankAccount | Payer's bank account number | BGMax/TotalIn: SendingAccount |
*Some formats support multiple references per transaction (e.g., split payments where one payment covers multiple invoices). Each reference includes its portion of the total amount. First element is the primary reference.
**Refunds could alternatively be indicated by a separate transaction type field.
Note: When multiple ISO 20022 source fields are listed, Zynergy's existing parsers resolve them as follows: - transactionId: Use EndToEndId (payer-provided), fall back to AcctSvcrRef (bank-assigned) if unavailable - references: Use RfrdDocInf.Nb for invoices/credit notes (CINV/CREN), or CdtrRefInf.Ref for structured OCR references (SCOR) - messages: Use Ustrd (unstructured free-text), fall back to AddtlRmtInf (additional remittance info) if unavailable
2.3 Suggested Fields
These fields are useful for validation, reconciliation, and international payments:
| Field | Purpose | Source Examples |
|---|---|---|
transactionCount | Number of transactions in batch | File/header level counts |
totalAmount | Sum of transaction amounts | File/header level totals |
conversion | Currency conversion details (only present when conversion occurred) | See below |
conversion.amount | Amount in original currency (before conversion) | ISO20022: InstdAmt, OFUXML: original transfer amount |
conversion.currency | Original currency code | ISO20022: InstdAmt.Ccy, OFUXML: sender currency |
conversion.rate | Exchange rate applied | ISO20022: XchgRate, OFUXML: exchange rate |
fees | Bank fees (only present for international payments) | See below |
fees.correspondentBank | Correspondent bank fees with amount and currency | OFUXML/TotalIn: CostsOtherBank |
fees.sendingBank | Sending bank fees with amount and currency | OFUXML/TotalIn: CostsSendingBank |
2.4 Extensions (Format-Specific Data)
Extensions provide a mechanism to preserve format-specific data that doesn't fit the common schema. This data is:
- Not required for core payment processing
- Useful for troubleshooting, auditing, and display purposes
- Variable across formats (most fields only exist in 1-3 formats)
How Extensions Work
The service returns format-specific data in an extensions object at both header and transaction levels. Consuming systems can:
- Ignore extensions entirely - Core processing works without them
- Store extensions as-is - Preserve for display/audit without parsing
- Extract specific fields - Use known extension fields when present
This approach keeps the core schema stable while allowing format-specific richness.
Example Extension Fields
| Field | Formats | Purpose |
|---|---|---|
sender | TotalIn, International | Original sender info for forwarded payments |
discountCode | BGMax, TotalIn | Early payment discount indicator |
bankReference | Various | Bank's internal reference number |
accountStatementRef | ISO20022 | Bank statement identifier (header-level) |
3. Proposed Schema
Core fields always present, format-specific data isolated in extensions.
{
"file": {
"uniqueId": "a1b2c3d4e5f6...",
"timestamp": "2024-01-15T10:30:00Z",
"format": "ISO20022_CAMT054",
"provider": "Nordea"
},
"headers": [
{
"paymentDate": "2024-01-15",
"currency": "SEK",
"receivingAccount": "5555-1234567",
"transactionCount": 2,
"totalAmount": 14000.00,
"transactions": [
{
"transactionId": "TXN-2024-001",
"amount": 10500.00,
"references": [{ "reference": "7340012345678", "amount": 10500.00 }],
"messages": ["Invoice 12345"],
"payer": {
"id": "SE5501011234",
"name": "Acme Corporation AB",
"address": "Storgatan 1, Stockholm",
"country": "SE",
"bankAccount": "1234-5678901"
},
"extensions": {
"discountCode": "0"
}
},
{
"transactionId": "TXN-2024-002",
"amount": 3500.00,
"references": [
{ "reference": "9912345678901", "amount": 2000.00 },
{ "reference": "9912345678902", "amount": 1500.00 }
],
"messages": [],
"payer": {
"id": "SE6601025678",
"name": null,
"address": null,
"country": null,
"bankAccount": null
},
"extensions": {}
}
],
"extensions": {
"accountStatementRef": "STMT-2024-001"
}
}
]
}