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 🙏

© 2025 – Pkg Stats / Ryan Hefner

abowire

v2.29.3

Published

This is the official **Abowire Javascript SDK**, which makes it easy to connect to the Abowire **GraphQL API** and includes all the required dependencies you need.

Downloads

780

Readme

Abowire Javascript SDK

This is the official Abowire Javascript SDK, which makes it easy to connect to the Abowire GraphQL API and includes all the required dependencies you need.

This library provides Typescript support and works both browser and NodeJS environments.

For rendering Web components in the browser to collect customer and payment information in the browser, use the Abowire Web SDK.


Documentation

See the full JS SDK docs.


Node.js SDK

Installation

Install the SDK via our NPM package:

npm install abowire
# or
yarn add abowire

Authentication

The SDK comes with an integrated OAuth2 client that handles authentication for you.

For backend applications we use the Client Credentials Grant, for which you will need to provide a Client ID and a secret.

import Abowire from 'abowire';

const abowire = new Abowire({
  clientId: '<your-client-id>',
  secret: '<your-secret>',
  accountId: '<your-account-id>',
});

If authentication is successful, the generated access token will be automatically used in all following requests to our APIs.

If authentication fails, the SDK throws an exception.

You can also provide a scopes parameter to specify your own authentication scopes.


Browser SDK

Installation

You can either install the SDK via our NPM package:

npm install abowire
# or
yarn add abowire

or by adding this script tag:

<script
  type="text/javascript"
  src="https://cdn.abowire.com/sdk/latest/abowire.js?clientId=<your-client-id>&callback=initAbowire"
  async
></script>

The SDK will make a global Abowire object available once loaded.

Since the SDK loads asynchronously, we provide a callback function you can use to perform any action after it has been loaded.

By default, this function needs to be called initAbowire, but you can rename it to something else by changing the callback name in the snippet above.

Eg:

<script>
  function initAbowire() {
    // The SDK has been loaded and the Abowire object is globally available now
  }
</script>

Authentication

The SDK comes with an integrated OAuth2 client that handles authentication for you.

For frontend applications we use the Authorization Code Grant, for which you will need to provide a public Client ID.

If you use the NPM package, you can provide the Client ID like this:

import Abowire from 'abowire';

const abowire = new Abowire({
  clientId: '<your-client-id>',
});

You can also provide a scopes parameter to specify your own authentication scopes.

If you used the script tag, you must edit <your-client-id> with your own Client ID in the script above.

You can then ask the user to log into Abowire with the login() function:

import Abowire from 'abowire';

const abowire = new Abowire({
  clientId: '<client-id>',
});

await abowire.login();

If authentication is successful, the generated access token will be automatically used in all following requests to our APIs.


Abowire Web Components

The Abowire SDK comes with built-in frontend components that you can easily integrate to your Website or apps.

In order to use these components, you will need to load the SDK as shown above.

Subscribe button

The Abowire Subscribe Button is a component that lets your customers easily subscribe to your products.

When a user clicks the Abowire Subscribe button, a Checkout is opened within your Website.

To make this work, you only need to add the <abowire-button> tag and specify the SKU of the plan and a text for your button:

<abowire-button product="free">Get started for free</abowire-button>
<abowire-button product="premium">Subscribe</abowire-button>

You can even style your button to fit your design using CSS:

<style>
  #my-styled-button {
    --abowire-button-width: 300px;
    --abowire-button-height: 50px;
    --abowire-button-border-radius: 0px;
    --abowire-button-padding: 0px 0px;
  }
</style>

<abowire-button id="my-styled-button" product="premium">Subscribe</abowire-button>

Embedded Checkout

In some cases you might want to embed the Abowire Checkout directly into your Website. You can use the <abowire-checkout> tag to do this:

<abowire-checkout product="premium"/></abowire-checkout>

Making requests

To help you get started faster, the SDK comes with a GraphQL client and many useful pre-made queries built-in:

const customer = await abowire.customer.create({ name: 'My Customer' });
console.log(customer);

const response = await abowire.customer.list();

console.log(response.items);

Making custom GraphQL queries

Of course, you can also make any custom queries as well:

// Define your own GraphQL query
const LIST_CUSTOMERS_QUERY = gql`
  query {
    customers {
      items {
        id
        name
      }
    }
  }
`;

const response = await abowire.graphql.query(LIST_CUSTOMERS_QUERY);

console.log(response.items);

See more examples in our JS SDK docs.


Support

If you need assistance or have any issues, reach out to us at [email protected].