0.1.0 • Published 8 months ago

@ekhineo/iso20022.js v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

iso20022.js

This package is meant for companies using ISO20022 to send and receive payment information.

Read the Docs: https://docs.iso20022js.com

The mission of this NPM package is to connect the most widely used programming language to the most widely used payment standard.

If you're interested in using iso20022.js and would like to use different payment types or ingest files using CAMT, please email svapnil@woodside.sh.

Book with Cal

Installation

npm install iso20022.js

Usage

Payment Initiation: Sending a SWIFT Transfer

import { ISO20022 } from 'iso20022.js';

const iso20022 = new ISO20022({
  initiatingParty: {
    name: 'Acme Corporation',
    id: 'ACMECORP',
    account: {
      accountNumber: '123456789012',
    },
    agent: {
      bic: 'CHASUS33',
      bankAddress: {
        country: 'US',
      },
    },
  },
});

const creditPaymentInitiation = iso20022.createSWIFTCreditPaymentInitiation({
  paymentInstructions: [
    {
      type: 'swift',
      direction: 'credit',
      amount: 1000,
      currency: 'USD',
      creditor: {
        name: 'Jane Smith',
        account: {
          iban: 'DE89370400440532013000',
        },
        agent: {
          bic: 'DEUTDEFF',
        },
        address: {
          streetName: '123 Main St',
          townName: 'Funkytown',
          postalCode: '12345',
          country: 'DE',
        },
      },
    },
  ],
});

console.log(creditPaymentInitiation.toString());

Cash Management: Ingesting a CAMT.053 file

import { CashManagementEndOfDayReport } from 'iso20022.js';

const xml = fs.readFileSync('balance_report.xml', 'utf8');
const report = CashManagementEndOfDayReport.fromXML(xml);

console.log(report.transactions);

About ISO20022

ISO20022 is the standard format for financial transactions. This library aims to build a powerful yet simple API to create these files, following Typescript conventions.

You might want to use this package if you need to create these types of files.

Features

FeatureDescriptionTodo
SWIFT Credit TransferCreate SWIFT credit transfer messages
CAMT TransactionsIngest transaction data from CAMT files🚧
SEPA Credit TransferCreate SEPA credit transfer messages🚧
Fednow Credit TransferCreate Fednow credit transfer messages🚧
XML GenerationGenerate valid ISO 20022 XML files
Type SafetyBuilt with TypeScript for enhanced type checking
ExtensibleEasy to extend for custom message types
ValidationBuilt-in validation for ISO 20022 message structures