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

digitalpaye-node

v1.0.0

Published

Official Node.js SDK for the DigitalPaye API — Mobile Money payments (Orange Money, MTN MoMo, Moov Flooz, Wave) in Côte d'Ivoire.

Readme

digitalpaye-node

Official Node.js SDK for the DigitalPaye API — accept and send Mobile Money payments (Orange Money, MTN MoMo, Moov Flooz, Wave) in Côte d'Ivoire.

Zero dependencies. Works with Node.js 14+.

Installation

npm install digitalpaye-node

Quick start

const DigitalPaye = require('digitalpaye-node');

const dp = new DigitalPaye({
  publicKey: process.env.DIGITALPAYE_PUBLIC_KEY,
  secret: process.env.DIGITALPAYE_SECRET,
});

// Directly collect a Mobile Money payment
const { data } = await dp.transactions.collect({
  amount: 5000,
  currency: 'XOF',
  operator_code: 'ORANGE_MONEY_CI',
  external_ref: 'INV-2026-001',
  otp: '3378',                 // required for Orange Money
  payer_phone: '0777101308',
  payer_first_name: 'Jean',
  payer_last_name: 'Konan',
  payer_email: '[email protected]',
});

console.log(data.status, data.reference);

The SDK handles the Basic → Bearer token exchange automatically (and caches/renews it) — you never need to call the /v1/auth/token endpoint yourself.

Usage examples

Orders (cart-style checkout)

const order = await dp.orders.create({
  currency: 'XOF',
  items: [
    { name: 'T-shirt', quantity: 2, unit_price: 5000 },
    { name: 'Shipping', quantity: 1, unit_price: 1000 },
  ],
  url_success: 'https://my-shop.com/thank-you',
  url_error: 'https://my-shop.com/cart',
});

await dp.orders.pay(order.data.reference, {
  operator_code: 'MTN_MONEY_CI',
  external_ref: 'ORDER-PAY-001',
  payer_phone: '0546123456',
  payer_first_name: 'Awa',
  payer_last_name: 'Touré',
  payer_email: '[email protected]',
});

Payment links

const link = await dp.paymentLinks.create({
  label: 'Support our school',
  amount: 10000,
  currency: 'XOF',
});
console.log(link.data.url); // share this URL

Payouts (send money out)

await dp.payouts.create({
  amount: 25000,
  currency: 'XOF',
  operator_code: 'WAVE_MONEY_CI',
  external_ref: 'PAYOUT-001',
  recipient_phone: '0707112233',
});

Balance

const { data } = await dp.balance.retrieve();
console.log(data.balance, data.currency);

Beneficiaries, Invoices, Bulk transfers, Scheduled transfers, Escrow, Contactless

All follow the same list / create / retrieve / update / delete pattern — see index.d.ts for the full list of methods and parameters, or browse src/resources/*.js (each file is self-contained and documented with JSDoc).

Error handling

Every failed request throws a DigitalPayeError:

const { DigitalPayeError } = require('digitalpaye-node');

try {
  await dp.transactions.collect({ amount: 50, currency: 'XOF', /* ... */ });
} catch (err) {
  if (err instanceof DigitalPayeError) {
    console.error(err.code, err.status, err.message, err.details);
  }
}

Pagination

List endpoints accept a params object forwarded as the query string (e.g. { page: 2, limit: 50, status: 'successful' }) and return { data, meta } where meta contains pagination info.

const { data, meta } = await dp.transactions.list({ page: 1, limit: 20 });

TypeScript

Type definitions are bundled (index.d.ts) — no @types package needed.

License

MIT