Socket
Socket
Sign inDemoInstall

svb-cards

Package Overview
Dependencies
48
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    svb-cards

Generating Virtual Cards using the Silicon Valley Bank API


Version published
Maintainers
1
Created

Readme

Source

svb-cards

A NodeJS helper library to create, cancel, and retrieve records of virtual debit cards.

Uses SVB-Client module and your API credentials.

Usage

let client = new SVBClient({
  API_KEY: '',
  HMAC_SECRET: ''
});
let SVBCard = new SVBCards(client);

// create and retrieve virtual card
// showCardNumber is true or false
SVBCard.create({ cardData }, showCardNumber, (err, response) => {
  console.log(response);
});

SVBCard.get(cardID, showCardNumber, callback);

// patch update
SVBCard.update(cardID, { cardData }, showCardNumber, callback);

// send an email to someone with their card details
SVBCard.email(cardID, 'janet@example.com', callback);

// cancel
SVBCard.cancel(cardID, callback);

// getting a list of cards
SVBCard.all({}, 0, 0, (err, response) => {
  // response.data is an array of cards
});

// using metadata filters (e.g. metadata.purchase_nunber)
SVBCard.find({ purchase_nunber: 101 }, 0, 0, (err, response) => {
  // response.data is an array of cards
});

// using pagination
SVBCard.find({ ... }, startCursor, limit, (err, response) => {
  // response.data is an array of cards
  // response.links.first is the first page of results
  // response.links.next moves cursor to the next page of results
  // e.g. "/v1/virtualcards?page[cursor]=87285"
});

Installation

npm install svb-cards --save

FAQs

Last updated on 13 Jun 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc