Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.
/ sepaxmljs Public archive

Generate XML-SEPA credit transfert (SCT)

License

Notifications You must be signed in to change notification settings

alxblog/sepaxmljs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sepaxmljs

Generate XML-SEPA credit transfert (SCT)

Installation

Via NPM

npm install --save sepaxmljs

SepaXML

Kind: global class
Todo

  • TODO: agrs: separate named parameters and handle optionals

new SepaXML(options)

SEPA-XML Object

Param Type Default Description
options Object
[options.version] string "urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" xmlns: SEPA XML pain version
options.debtor object debtor
options.debtor.name string debtor's name
options.debtor.iban string debtor's International Bank Account Number (IBAN)
options.debtor.bic string debtor
options.msgId string Point to point reference, as assigned by the instructing party, and sent to the next party in the chain to unambiguously identify the message.

Example

var XmlSEPA = require('sepaxmljs');

var sepa = new XmlSEPA({
    debtor:{
        name: "ACME Corp",
        iban : "FR7630004000031234567890143",
        bic: "BNPAFRPPFAK"
    },
    msgId: "MyMessageID",
    version: "urn:iso:std:iso:20022:tech:xsd:pain.001.001.03"
});

sepa.addPaymentInfo("Payment1")
    .addTransaction("Id1", "Alexandre", 50, "FR7630004000031234567890143", "BNPAFRPPXXX", "instruction1")
    .addPaymentInfo("Payment2")
    .addTransaction("Id2","John DOE", {amount: 100, currency: "EURO"}, "FR7630004000031234567890143", "BNPAFRPPXXX");

console.log( sepa.toString() );

sepaXML.addPaymentInfo(pmtInfId)

Add new Credit Transfer Transaction Information

Kind: instance method of SepaXML

Param Type Description
pmtInfId string Set of elements used to reference a payment instruction.

sepaXML.addTransaction(pmtId, creditor, amount, iban, bic, [instruction])

Add new Credit Transfer Transaction Information

Kind: instance method of SepaXML

Param Type Description
pmtId string Set of elements used to reference a payment instruction.
creditor string | Object Name by which a party is known and which is usually used to identify that party
amount number Amount of money to be moved between the debtor and creditor, before deduction of charges, expressed in the currency as ordered by the initiating party.
iban string Creditor International Bank Account Number (IBAN) - identifier used internationally by financial institutions to uniquely identify the account of a customer.
bic string Creditor Bank Identifier Code.
[instruction] string Information supplied to enable the matching of an entry with the items that the transfer is intended to settle, such as commercial invoices in an accounts' receivable system.

sepaXML.toString() ⇒ string

Generate XML SEPA content

Kind: instance method of SepaXML
Returns: string - XML SEPA

About

Generate XML-SEPA credit transfert (SCT)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published