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

lygos-sdk

v1.0.0

Published

A lightweight Node.js SDK for integrating with the LYGOS payment API

Downloads

6

Readme

LYGOS Node.js SDK

LYGOS is a lightweight Node.js SDK to easily interact with the LYGOS Payment API.
It allows you to:

  • Create payment links
  • Check payment status
  • Retrieve detailed payment information
  • List all your transactions

Installation

Run the following command to install dependencies:

npm install lygos

Import LYGOS into your project:

const LYGOS = require('lygos'); 
const lygos = new LYGOS('YOUR_API_KEY');

Where to get your API key

Create an account and get your API key from:
https://pay.lygosapp.com/dashboard/api-keys

Available Methods

1. initPayement(data)

Create a new payment link.

Parameters:

  • amount (Integer) — Required — Minimum: 100 XAF
  • shop_name (String) — Required — Name of your shop
  • order_id (String) — Required — Unique ID for your order
  • failure_url (String) — Optional — URL to redirect on payment failure
  • success_url (String) — Optional — URL to redirect on payment success
  • message (String) — Optional — Custom message

Example:

const payment = await lygos.initPayement({
    amount: 500,
    shop_name: "My Store",
    order_id: "ORDER12345",
    success_url: "https://yourwebsite.com/success",
    failure_url: "https://yourwebsite.com/failure",
    message: "Thank you for your purchase!"
});
console.log(payment);

2. payementStatus(order_id)

Check the current status of a payment ("pending", "success", "failed").

Parameters:

  • order_id (String) — Required — The ID of your order

Example:

const status = await lygos.payementStatus("ORDER12345");
console.log(status);

3. getPayement(order_id)

Get full details about a specific payment.

Parameters:

  • order_id (String) — Required — The ID of your order

Example:

const paymentDetails = await lygos.getPayement("ORDER12345");
console.log(paymentDetails);

4. listOfPayement()

List all your previous transactions.

Example:

const allPayments = await lygos.listOfPayement();
console.log(allPayments);

Error Handling

All methods handle errors and return a clear object:

{
    "status": 400,
    "message": "amount is required"
}

Full Example

const LYGOS = require("lygos");
const lygos = new LYGOS('YOUR_API_KEY');

async function main() {
    const payment = await lygos.initPayement({
        amount: 1000,
        shop_name: "CypherX Store",
        order_id: "CYX-98765",
        success_url: "https://cypherx.com/success",
        failure_url: "https://cypherx.com/fail"
    });
    console.log(payment);

    const status = await lygos.payementStatus("CYX-98765");
    console.log(status);

    const details = await lygos.getPayement("CYX-98765");
    console.log(details);

    const transactions = await lygos.listOfPayement();
    console.log(transactions);
}

main();

License

MIT License © 2025 — Developed by Warano


Acknowledgements

  • Thanks to LYGOSAPP for their API.
  • Thanks to the Node.js community for libraries and tools.