@cardscan.ai/cardscan-client
TypeScript icon, indicating that this package has built-in type declarations

0.11.0 • Public • Published

cardscan-ai/cardscan-client

Typescript API client for the CardScan API

Environment

  • Node.js
  • Webpack
  • Browserify

Module system

  • CommonJS
  • ES6 module system

Installation

npm install @cardscan.ai/cardscan-client
yarn add @cardscan.ai/cardscan-client

Usage

import { CardScanApi } from "@cardscan.ai/cardscan-client";

const cardScanApi = new CardScanApi({
  /*
   * By default the API will the production url if NODE_ENV is "production" and the sandbox url otherwise.
   * You can also specify a url manually.
   * */
  // baseUrl: "https://api.cardscan.ai/v1",

  apiKey: "<your-api-key>",
});

const main = async () => {
  try {
    const response = await cardScanApi.checkEligibility("<card-id>", {
      subscriber: {
        firstName: "John",
        lastName: "Doe",
        dateOfBirth: "18020101",
      },
      provider: {
        firstName: "John",
        lastName: "Doe",
        npi: "0123456789",
      },
    });
  } catch (e) {
    console.error(e);
  }
};

main();

Package Sidebar

Install

npm i @cardscan.ai/cardscan-client

Weekly Downloads

1,662

Version

0.11.0

License

SEE LICENSE IN LICENSE.md

Unpacked Size

348 kB

Total Files

192

Last publish

Collaborators

  • cardscan
  • nickls
  • zcylla