All Projects → openpesa → pesa-js

openpesa / pesa-js

Licence: MIT license
Pesa SDK

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to pesa-js

php-pesa
Open payment integration toolkit for PHP
Stars: ✭ 26 (+36.84%)
Mutual labels:  tanzania, mpesa, pesa-sdk
tz-mpesa-ussd-push
Vodacom Tanzania USSD Push API Client
Stars: ✭ 18 (-5.26%)
Mutual labels:  tanzania, mpesa
Plagiarism-checker-Python
A python project for checking plagiarism of documents based on cosine similarity
Stars: ✭ 114 (+500%)
Mutual labels:  tanzania
Documentations
Documentation to integrate PayU SDKs
Stars: ✭ 26 (+36.84%)
Mutual labels:  mobile-payments
python-daraja
Python Wrapper for interacting with the MPESA Daraja API. More Features to be implemented
Stars: ✭ 20 (+5.26%)
Mutual labels:  mpesa
loopy
Loopy is an unofficial cli client for CBA Loop for the lazy bones
Stars: ✭ 23 (+21.05%)
Mutual labels:  mpesa
sapamapay
New Safaricom MPESA (Daraja) API
Stars: ✭ 31 (+63.16%)
Mutual labels:  mpesa
python-client
A Python library to ease the integration with the Beem Africa (SMS, AIRTIME, OTP, 2WAY-SMS, BPAY, USSD)
Stars: ✭ 24 (+26.32%)
Mutual labels:  tanzania
safaricom-daraja-nodejs
Standalone M-Pesa payments service using the new Daraja Payment API by Safaricom.
Stars: ✭ 31 (+63.16%)
Mutual labels:  mpesa
Nida
Unofficial package for fetching users information based on National ID Number (Tanzania)
Stars: ✭ 47 (+147.37%)
Mutual labels:  tanzania
pyswahili
A Swahili version of programming language to allow Swahili speakers get started with programming
Stars: ✭ 64 (+236.84%)
Mutual labels:  tanzania
CodeForAfrica.org
The @CodeForAfrica landing page. Built with Jekyll and hosted on Github Pages. Accessible at https://codeforafrica.org/
Stars: ✭ 20 (+5.26%)
Mutual labels:  tanzania
tra-docs
TRA Documentation
Stars: ✭ 15 (-21.05%)
Mutual labels:  tanzania
mtaa
A package consisting of all Tanzania locations from region to streets in an easily accessible way
Stars: ✭ 27 (+42.11%)
Mutual labels:  tanzania
mpesa-dart
A dart wrapper around mpesa daraja api
Stars: ✭ 19 (+0%)
Mutual labels:  mpesa
JustJava-Android
JustJava is a mock food ordering and delivery application for a coffee shop.
Stars: ✭ 59 (+210.53%)
Mutual labels:  mpesa
mpesa-rust
An abstraction/wrapper on top of Safaricom's M-PESA daraja api in Rust
Stars: ✭ 17 (-10.53%)
Mutual labels:  mpesa
mpesa-rest-api
mpesa rest api converts the mpesa api to a RESTful API that is easy for developers to use instead of the current SOAP web service provided by mpesa.
Stars: ✭ 24 (+26.32%)
Mutual labels:  mpesa
ex pesa
Payment Library For Most Public Payment API's in Kenya and hopefully Africa. Let us get this moneybag
Stars: ✭ 19 (+0%)
Mutual labels:  mpesa
lndr-mobile
LNDR mobile app in React Native
Stars: ✭ 14 (-26.32%)
Mutual labels:  mobile-payments

M-Pesa Logo

Pesa SDK for Nodejs using M-Pesa Open API

npm (scoped) Build Status documentation NPM

The Pesa SDK for Node.js makes it easy for developers to access OpenAPI in their Javascript code, and build robust applications and software using services like Customer 2 Bussiness, Query, etc.

Documentation

Take a look at the API docs here.

Getting Started

  1. Sign up for OpenAPI Portal – Before you begin, you need to sign up for an account and retrieve your credentials.

  2. Minimum requirements – To run the SDK, your system will need to meet the minimum requirements, including having Node >= 10.1.

  3. Install the SDK – Using NPM is the recommended way to install the Pesa SDK for JS. The SDK is available via [NPM] under the openpesa/pesa-js package. You can run the following in the base directory of your project to add the SDK as a dependency:

    npm install openpesa/pesa-js

    Please see the Installation section of the User Guide for more detailed information about installing the SDK through Composer and other means.

  4. Using the SDK – The best way to become familiar with how to use the SDK is to read the User Guide.

Usage

Quick Examples

import { Pesa } from '@openpesa/pesa-js';

// Populate the credentials
const api_key = 'your_api_key';
const public_key = 'the_public_key';

// Intiate with credentials
let pesa = new Pesa({ api_key, public_key });

// Setup the transaction
let data = {
    input_Amount: 10000,
    // ..
};

// Execute the transaction
pesa.c2b(data)
    .then((data) => {
        // Print results
        console.log(data);
    })
    .catch((e) => {
        console.log('err: ' + e);
    });

Testing

npm test

Opening Issues

If you have a feature request or you encounter a bug, please file an issue on our issue tracker on GitHub.

Road Map

  1. Validate data input using Regex before the API call.
  2. If fields are not provided then generate a random string for "input_ThirdPartyConversationID" and "input_TransactionReference"
  3. Allow optional input for not required fields in a request.
  4. Check and Throw an error when used outside of Node.js due to security reasons, Advice on use outside Node.js.
  5. Validate Secret Keys length and format.
  6. Allow user use custom sessionID on any/each transaction. (Portal allow for seesion with several hours of validity)
  7. Add and improve documentation and examples(example will include expressjs app)

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].