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 🙏

© 2026 – Pkg Stats / Ryan Hefner

woven-pay-js

v1.0.3

Published

Js SDK for the Woven Payment REST api

Readme

WOVEN PAYMENTS JS SDK

** PLEASE NOTE THAT THIS LIBRARY IS UNDER ACTIVE DEVELOPMENT **

USAGE

Install

npm i -S woven-pay-js

SUPPORTED RESOURCES

  • Customers
  • Payments
  • Plans
  • Webhooks
  • Payments

To Be Added

  • Account Resource [GET and PUT only]
  • Business Resource [GET and PUT only]
  • Plan Resource [GET]
  • Webhook Resource [GET]
  • Subscriptions Resource
  • Payment refund
  • Payment cancel
  • Payment disburse
  • Payment disburse

Create a new Instance of wovenpay

import WovenPay from 'woven-pay-js';
let wovenpay = new WovenPay(url, apikey, apisecret);

To add Token

let token = "mytoken"
wovenpay.token = token

To add request timeout

wovenpay.timeout = 5000 //5 seconds max

To add api version

wovenpay.version = "1" //Every request will use version 1 of wovenpay api

To get Token

let response = await wovenpay.getAuthToken(merchantEmail: string, merchantPassword: string)
token = await response.json();

To refresh Token

let response = await wovenpay.refreshAuthToken(token: string)
token = await response.json();

To verify Token

let response = await wovenpay.verifyAuthToken(token: string)
is_valid = await response.json();

Customer

To Create a new customer

wovenpay.Customers.create(json payload)

let response = await wovenpay.Customers.create({email: email});
customer = await response.json();
To Edit a customer

wovenpay.Customers.edit(customer id, json payload)

let response = wovenpay.Customers.edit(customer.id, {email: email});
customer = await response.json();
To Delete a customer

wovenpay.Customers.delete(customer id)

let response = wovenpay.Customers.delete(customer.id);
customer = await response.json();
Retrieve all customers

wovenpay.Customers.all()

let response = wovenpay.Customers.all();
customers = await response.json();
Retrieve Specific customer

wovenpay.Customers.get(customer id)

let response = wovenpay.Customers.get(customer.id);
customer = await response.json();

Plan

To Create a new plan

wovenpay.Plans.create(json payload)

let response = await wovenpay.Plans.create({name:planName, business: Business, price:1000});
plan = await response.json();
To Edit a plan

wovenpay.Plans.edit(plan id, json payload)

let response = wovenpay.Plans.create({name:planName, business: Business, price:2000});
plan = await response.json();
To Delete a plan

wovenpay.Plans.delete(plan id)

let response = wovenpay.Plans.delete(plan.id);
plan = await response.json();

Payments

To Create a new Payments Charge

wovenpay.Payments.charge(json payload)

payload = {
  "method": "mobile.mpesa",
  "amount": 10,
  "mobile":phone,
  "customer": {
    "email":test
  },
  "order": {
    "description": "Payment of Dockerfest Ticket"
  },
  "reference": "myuniquereference"
}
let response = await wovenpay.Payments.charge(payload);
charge = await response.json();
Get list of Payment transactions

You should probably want to use graphql query wovenpay.Payments.transactions()

let response = wovenpay.Payments.transactions();
transactions = await response.json();
To Transaction Status

wovenpay.Payments.status(transaction id)

let response = wovenpay.Payments.status(transaction.id);
status = await response.json();

Webhook

To Create a new webhook

wovenpay.Webhooks.create(json payload)

let response = await wovenpay.Webhooks.create({event: event, target:url, key:"notsecretkey"});
hook = await response.json();
To Edit a webhook

wovenpay.Webhooks.edit(hook id, json payload)

let response = wovenpay.Webhooks.create({event:"customer.created", target: url, key:"secretkey"});
hook = await response.json();
To Delete a webhook

wovenpay.Webhooks.delete(hook id)

let response = wovenpay.Webhooks.delete(hook.id);
hook = await response.json();

GraphQl Query

Query Graph

One can use both string or template literals wovenpay.Graph.query(json payload)

let response = await wovenpay.Graph.query(`{ allBusinesses {edges{node{id name }}} }`)
let response2 = await wovenpay.Graph.query`{ allBusinesses {edges{node{id name }}} }`