@payoneer/op-card-identification-lib
v1.10.0
Published
Card identification library
Downloads
52
Readme
op-card-identification-lib
This library detects card network from given BinNumber
. It has both frontend and backend detection utilities. For upto 5 characters of binNumber
, it will do client side eager lookup and will fallback to BIN API when BinNumber >= 6 && BinNumber <= 8
Note: This project needs node version >= 14.18.0
for development.
Install
npm install @payoneer/op-card-identification-lib
Available exports
identifyCardNetwork(binNumber: BinNumber, endpoint?: BinLookupURL): Promise<networkCode>
Import
ESM
import { identifyCardNetwork } from "@payoneer/op-card-identification-lib";
CommonJS
const { identifyCardNetwork } = require("@payoneer/op-card-identification-lib");
UMD
<script src="../build/op-card-identification-lib.js"></script>
Exposing opCardIdentificationLib
in window global scope from UMD bundle
Usage
const network = await identifyCardNetwork(<BinNumber>, <BinLookupURL>);
UMD
opCardIdentificationLib.identifyCardNetwork(<BinNumber>, <BinLookupURL>).then(....)