# ISO-20022 Message Samples ## Overview This document provides sample ISO-20022 message snippets (pacs.008, camt.052/053, camt.056) showing how plan metadata, digital signatures, and compliance attributes (LEI, DID, KYC, AML) are embedded in ISO messages for the Combo Flow system. --- ## 1. pacs.008 - Payment Instruction (with Plan ID and Signature) ### Complete Example ```xml MSG-2025-01-15-001234 2025-01-15T10:30:00.000Z 1 78000.00 Example Corp Ltd. 5493000IBP32UQZ0KL24 LEI compliance@example.com +49-30-12345678 PLAN-12345678-ABCD-EFGH-IJKL TX-2025-01-15-001234 550e8400-e29b-41d4-a716-446655440000 SEPA INST SUPP 78000.00 BANKDEFFXXX Example Bank AG BENEFRPPXXX Beneficiary Bank Example Corp Ltd. Main Street 123 10115 Berlin DE 5493000IBP32UQZ0KL24 LEI compliance@example.com DE89370400440532013000 CACC BANKDEFFXXX Beneficiary Corp Beneficiary Street 456 20095 Hamburg DE DE89370400440532013001 CACC BENEFRPPXXX Plan ID: PLAN-12345678-ABCD-EFGH-IJKL | Combo Flow Execution CINV PLAN-12345678-ABCD-EFGH-IJKL 2025-01-15 78000.00 PUOR DLT-TX-0x1234567890abcdef1234567890abcdef12345678 ComboFlowComplianceData PLAN-12345678-ABCD-EFGH-IJKL 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890 EXEC-2025-01-15-001234 5493000IBP32UQZ0KL24 did:web:example.com:user:123 2 Onfido true 2025-01-10T08:00:00Z 2026-12-31T23:59:59Z true Chainalysis 2025-01-15T09:00:00Z LOW AML-REF-2025-01-15-001 ECDSA secp256k1 SHA-256 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef 2025-01-15T10:25:00Z 1 Ethereum Mainnet 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef 18500000 2025-01-15T10:29:45Z 0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321 0xNotaryRegistryContractAddress 2025-01-15T10:28:00Z ``` ### Key Elements 1. **Plan ID in `EndToEndId`**: `PLAN-12345678-ABCD-EFGH-IJKL` 2. **LEI in `InitgPty.Id`** and **`Dbtr.Id`**: `5493000IBP32UQZ0KL24` 3. **DLT Reference in `RmtInf`**: DLT transaction hash 4. **Compliance Data in `SplmtryData`**: Full compliance attributes (LEI, DID, KYC, AML) 5. **Digital Signature in `SplmtryData`**: User's wallet signature 6. **Notary Proof in `SplmtryData`**: Notary registry proof hash --- ## 2. camt.052 - Bank Statement (for Reconciliation) ### Example ```xml STMT-2025-01-15-001 2025-01-15T11:00:00Z Example Corp Ltd. 5493000IBP32UQZ0KL24 LEI STMT-2025-01-15-001 2025-01-15T11:00:00Z DE89370400440532013000 CACC EUR OPBD 100000.00
2025-01-15
-78000.00 DBIT BOOK
2025-01-15
2025-01-15
TX-2025-01-15-001234 PMNT ICDT ESCT PLAN-12345678-ABCD-EFGH-IJKL TX-2025-01-15-001234 Plan ID: PLAN-12345678-ABCD-EFGH-IJKL Beneficiary Corp
CLBD 22000.00
2025-01-15
``` ### Key Elements 1. **Plan ID in `EndToEndId`**: Links statement entry to execution plan 2. **LEI in `MsgRcpt.Id`**: Account holder's LEI 3. **Transaction Reference**: Links to original payment instruction --- ## 3. camt.053 - Account Statement (Detailed) ### Example ```xml STMT-DETAIL-2025-01-15-001 2025-01-15T11:00:00Z STMT-DETAIL-2025-01-15-001 DE89370400440532013000 -78000.00 DBIT BOOK
2025-01-15
PLAN-12345678-ABCD-EFGH-IJKL TX-2025-01-15-001234 Plan ID: PLAN-12345678-ABCD-EFGH-IJKL | DLT TX: 0x1234...5678 Example Corp Ltd. 5493000IBP32UQZ0KL24 LEI Beneficiary Corp BANKDEFFXXX
``` --- ## 4. camt.056 - Cancellation Request (for Rollback) ### Example ```xml CANCEL-2025-01-15-001 2025-01-15T10:35:00Z Example Corp Ltd. 5493000IBP32UQZ0KL24 LEI CANCEL-TX-2025-01-15-001 DUPL DLT execution failed. Rolling back payment instruction. MSG-2025-01-15-001234 pacs.008.001.10 2025-01-15T10:30:00Z TX-2025-01-15-001234 PLAN-12345678-ABCD-EFGH-IJKL 78000.00 PLAN-12345678-ABCD-EFGH-IJKL TX-2025-01-15-001234 ComboFlowRollbackData PLAN-12345678-ABCD-EFGH-IJKL DLT_EXECUTION_FAILED ROLLED_BACK 0xfedcba0987654321... ``` ### Key Elements 1. **Cancellation Reason**: `DLT execution failed` 2. **Original Plan ID**: `PLAN-12345678-ABCD-EFGH-IJKL` 3. **Rollback Data**: DLT state and notary proof in supplementary data --- ## 5. Message Generation Code ### TypeScript Example ```typescript import { generateISO20022Message } from '@comboflow/iso20022'; const generatePaymentInstruction = async ( plan: Plan, compliance: ComplianceStatus, signature: string, dltTxHash: string, notaryProof: string ): Promise => { const isoMessage = generateISO20022Message({ messageType: 'pacs.008', groupHeader: { messageId: `MSG-${Date.now()}`, creationDateTime: new Date(), initiatingParty: { name: 'Example Corp Ltd.', lei: compliance.lei } }, creditTransfer: { paymentId: { endToEndId: plan.planId, transactionId: `TX-${Date.now()}` }, amount: { currency: 'EUR', value: 78000.00 }, debtor: { name: 'Example Corp Ltd.', lei: compliance.lei, account: { iban: 'DE89370400440532013000' } }, creditor: { name: 'Beneficiary Corp', account: { iban: 'DE89370400440532013001' } }, remittanceInformation: { unstructured: `Plan ID: ${plan.planId} | Combo Flow Execution` }, supplementaryData: { planId: plan.planId, planHash: plan.planHash, compliance: { lei: compliance.lei, did: compliance.did, kyc: compliance.kyc, aml: compliance.aml }, digitalSignature: { algorithm: 'ECDSA', signerAddress: plan.signerAddress, signatureValue: signature }, dltReference: { chainId: 1, transactionHash: dltTxHash }, notaryProof: { proofHash: notaryProof } } } }); return isoMessage; }; ``` --- **Document Version**: 1.0 **Last Updated**: 2025-01-15 **Author**: Integration Team