node-idin

NodeJS Library for iDIN (https://www.idin.nl/)


Keywords
idin, node-idin, kyc, idin kyc, dutch-kyc
License
ISC
Install
npm install node-idin@0.10.4

Documentation

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.