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

sibs-payments

v1.0.2

Published

A payment system module for SIBS payments integration with card tokenization support

Downloads

573

Readme

SIBS Payment System

A Node.js module for SIBS payments integration with support for multiple payment methods including card tokenization, MB WAY, and MB Reference payments.

Features

  • Card Payments: Process payments using card tokens
  • Card Tokenization: Save card information securely for future payments
  • MB WAY Payments: Process payments via MB WAY mobile app
  • MB Reference Payments: Generate payment references for bank transfers
  • Payment Status: Check transaction status

Installation

npm install https://github.com/Procimo/sibs-payments

Usage

Import the module

import payments from 'sibs-payments';

Card Tokenization

Save a card for future payments:

const iam = {
    clientId: "YOUR_SIBS_CLIENT_ID",
    terminalId: 12345, // Note: terminalId is a number
    bearerToken: "YOUR_SIBS_TOKEN_BEARER",
}

const data = {
    id: "custom-id",
    description: "Saving Card",
    PAN: "4111111111111111",
    secureCode: "123",
    validationDate: "12/25",
    customerName: "John Doe",
    customerEmail: "[email protected]",
    billingAddress: {
        street1: "Rua da Graça",
        street2: "",
        city: "Lisbon",
        postcode: "1200-999",
        country: "PT"
    }
};

const result = await payments.SaveCard(iam, data);

Card Payment with Token

Process a payment using a saved card token:

const iam = {
    clientId: "YOUR_SIBS_CLIENT_ID",
    terminalId: 12345,
    bearerToken: "YOUR_SIBS_TOKEN_BEARER",
}

const data = {
    id: "custom-id",
    description: "Card Payment",
    token: "saved_card_token_here",
    secureCode: "123",
    currency: "EUR",
    value: 100.00,
    customerName: "John Doe",
    customerEmail: "[email protected]",
    billingAddress: {
        street1: "Rua da Graça",
        street2: "",
        city: "Lisbon",
        postcode: "1200-999",
        country: "PT"
    }
};

const result = await payments.Card(iam, data);

MB WAY Payment

Process a payment via MB WAY:

const iam = {
    clientId: "YOUR_SIBS_CLIENT_ID",
    terminalId: 12345,
    bearerToken: "YOUR_SIBS_TOKEN_BEARER",
}

const data = {
    id: "custom-id",
    description: "MB Way Payment",
    phone: "351#912345678",
    currency: "EUR",
    value: 50.00,
};

const result = await payments.MbWay(iam, data);

MB Reference Payment

Generate a payment reference for bank transfer:

const iam = {
    clientId: "YOUR_SIBS_CLIENT_ID",
    terminalId: 12345,
    bearerToken: "YOUR_SIBS_TOKEN_BEARER",
}

const data = {
    id: "custom-id",
    description: "MB Ref Payment",
    entity: "12345",
    currency: "EUR",
    value: 50.00,
};

const result = await payments.MbRef(iam, data);

Check Payment Status

Check the status of a transaction:

const iam = {
    clientId: "YOUR_SIBS_CLIENT_ID",
    terminalId: 12345,
    bearerToken: "YOUR_SIBS_TOKEN_BEARER",
}

const status = await payments.Status(iam, transactionId);

Configuration

You'll need the following credentials from SIBS:

  • clientId: Your client ID (string)
  • terminalId: Your terminal ID (number)
  • bearerToken: Your authentication bearer token (string)

Data Types

IAM

interface IAM {
    clientId: string;
    terminalId: number;
    bearerToken: string;
}

Address

interface Address {
    street1: string;
    street2: string;
    city: string;
    postcode: string;
    country: string;
}

SaveCardData

interface SaveCardData {
    id: string;
    PAN: string;
    validationDate: string;
    customerName: string;
    customerEmail: string;
    secureCode?: string;
    billingAddress?: Address;
    description?: string;
}

CardData

interface CardData {
    id: string;
    token: string;
    value: number;
    currency: string;
    customerName: string;
    customerEmail: string;
    secureCode?: string;
    billingAddress?: Address;
    description?: string;
}

MbWayData

interface MbWayData {
    id: string;
    description: string;
    phone: string;
    currency: string;
    value: number;
}

MbRefData

interface MbRefData {
    id: string;
    description: string;
    entity: string;
    currency: string;
    value: number;
}

Development

# Install dependencies
npm install

# Build the project
npm run build

License

ISC