Generate XML-SEPA credit transfert (SCT)
Via NPM
npm install --save sepaxmljs
Kind: global class
Todo
- TODO: agrs: separate named parameters and handle optionals
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() );
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. |
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. |
Generate XML SEPA content
Kind: instance method of SepaXML
Returns: string
- XML SEPA