node-idin
TypeScript icon, indicating that this package has built-in type declarations

2.1.2 • Public • Published

node-idin Build Status Coverage Status

Node.js Library for iDIN. You can find all the protocol documentation here. Supporting Node 10+.

How to use

Install the dep by:

yarn add node-idin

Create a NodeIdin instance:

const config = {
    merchantId:  '35235',
    merchantSubId:  '0',
    routingEndpoint:  'https://abnamro-test.bank-request.com/bvn-idx-bankid-rs/bankidGateway',
    routingCert:  '-----BEGIN CERTIFICATE-----...',
    privateKey:  '-----BEGIN RSA PRIVATE KEY-----...',
    publicKey:  '-----BEGIN PUBLIC KEY-----...',
    publicKeyFingerprint:  'xekf2o3f...',
}
 
const idin = new NodeIdin(config);

Use the method you need:

const directory = await idin.getDirectory();
const transaction = await idin.getTransaction({
    loa: 'loa3',
    merchantReturnUrl: 'https://...',
    idPrefix: 'RND',
    requestedService: '21968',
    defaultLanguage: 'en',
    expirationPeriod: 'PT5M',
    issuerId: 'randomId',
    transactionId: 'randomId#2',
});
const status = await idin.getStatus({ transactionId:  '92fo2k3qdd' });

Notes

  • Read protocol documentation for a better understanding of the parameters.

  • This library does not fully implement the protocol and has some issues that still need to be addressed. Use at your own risk.

Dependents (0)

Package Sidebar

Install

npm i node-idin

Weekly Downloads

584

Version

2.1.2

License

ISC

Unpacked Size

45.7 kB

Total Files

31

Last publish

Collaborators

  • jfght