npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

checkbook-api

v3.2.4

Published

Node.js library for the Checkbook.io API

Downloads

1,841

Readme

Node.js library for the Checkbook.io API

This library provides convenient access to the Checkbook.io API from applications written in Node.js.

Installation

Install the package with:

npm install checkbook-api --save

Configuration

The package needs to be configured with your account's API Key and API Secret.

:key: The API credentials below are from the demo environment and you can use them to try the API.

var CheckbookAPI = require('checkbook-api');
var Checkbook = new CheckbookAPI({
	api_key: 'd6aa2703655f4ba2af2a56202961ca86',
	api_secret: 'dXbCgzYBMibj8ZwuQMd2NXr6rtvjZ8',
	env: 'demo'
});

The env parameter is optional and can be omitted if the requests are made to the live environment.
The possible values for this parameter are demo or sandbox and the API credentials need to be from the specified environment.

You can get the API Key and API Secret values from the Settings page.

API Key and API Secret

OAuth

If you wish to send requests on behalf of another user, this user will use OAuth in order to generate a key that may be used on their behalf. You can get more details on our OAuth documentation page.

Once you obtain the bearer token for a user, you can use it to send API requests on its behalf:

var CheckbookAPI = require('checkbook-api');
var Checkbook = new CheckbookAPI({
	bearer: '3658db04db340ce57b35fde7a56f669be222d96e33219bf28409812d1ca364b5',
	env: 'demo'
});

Usage

You can use the following code snippet to send a digital check:

Checkbook.checks.sendDigitalCheck({
    name: 'Widgets Inc.',
    recipient: '[email protected]',
    description: 'Test Send Check',
    amount: 10.00
}, function (error, response) {
    if (error) {
        console.log('Error:', error);
    } else {
        console.log('Response:', response);
    }
});

You can use the following code snippet to query the list of checks:

Checkbook.checks.list({
    page: 1,
    per_page: 10,
    status: 'UNPAID'
}, function (error, response) {
    if (error) {
        console.log('Error:', error);
    } else {
        console.log('Response:', response);
    }
});

:star: You can find more code samples here.

Methods reference

The Checkbook class has several endpoints and you can find below the methods each one provides.

You can click on the :book: icon to access the detailed API reference for each method.

  • Checkbook.checks
    • list(query, callback) :book:
    • get(check_id, callback) :book:
    • delete(check_id, callback) :book:
    • sendDigitalCheck(params, callback[, idempotencyKey]) :book:
    • sendPhysicalCheck(params, callback[, idempotencyKey]) :book:
    • sendDirectCheck(params, callback[, idempotencyKey])
    • sendMultipleChecksCSV(params, callback[, idempotencyKey])
  • Checkbook.invoices
    • list(query, callback) :book:
    • get(invoice_id, callback) :book:
    • delete(invoice_id, callback) :book:
    • sendInvoice(params, callback[, idempotencyKey]) :book:
    • payInvoice(params, callback[, idempotencyKey]) :book:
  • Checkbook.subscriptions
    • list(query, callback) :book:
    • get(subscription_id, callback) :book:
    • delete(subscription_id, callback) :book:
    • update(subscription_id, params, callback) :book:
    • sendRecurringCheck(params, callback[, idempotencyKey]) :book:
    • sendRecurringInvoice(params, callback[, idempotencyKey]) :book:
  • Checkbook.banks
    • list(callback) :book:
    • institutions(callback) :book:
    • delete(bank_id, callback) :book:
    • instantAccountVerification(params, callback[, idempotencyKey]) :book:
    • addBankAccount(params, callback[, idempotencyKey]) :book:
    • verifyMicrodesposits(params, callback) :book:
  • Checkbook.users
    • create(params, callback[, idempotencyKey]) :book:
    • update(params, callback) :book:
    • get(callback) :book:
    • list(query, callback) :book:
    • delete(user_id, callback) :book:
    • addSignature(params, callback) :book:

:bulb: The query object used for the list(query, callback) methods can have the following attributes:

  • start_date : 'yyyy-mm-dd'
  • end_date : 'yyyy-mm-dd'
  • direction : 'INCOMING'|'OUTGOING'
  • sort: '+NUMBER'|'-NUMBER'|'+TYPE'|'-TYPE'|'+AMOUNT'|'-AMOUNT'|'+STATUS'|'-STATUS'|'+DATE'|'-DATE'|'+DESCRIPTION'|'-DESCRIPTION'
  • status : 'PAID'|'IN_PROCESS'|'UNPAID'|'VOID'|'EXPIRED'|'PRINTED'|'MAILED'|'FAILED'|'REFUNDED'
  • q : 'search query'
  • per_page : 10|25|50
  • page : [1..N]
  • type : 'CHECK'|'INVOICE'|'SUBSCRIPTION'

Getting help

If you need help installing or using the library, please contact Checkbook.io Support at [email protected].

If you've instead found a bug in the library or would like new features added, please open issues or pull requests against this repo.

More Information