1.0.2 • Published 3 years ago

nupeye-js v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Nupeye Node.js Library

Version Downloads Try on RunKit

Nupeye wallet offers a convenient electronic multi-currency money with a great number of ways to top-up and withdraw.The Nupeye Node library provides convenient access to the Nupeye API from applications written in server-side JavaScript.

Documentation

See the full documentation API docs for all others languages.

Requirements

Node 8, 10 or higher.

Installation

Install the package with:

npm install nupeye-js --save
# or
yarn add nupeye-js

Usage

Login

You need to provide your APP_ID and API_KEY, which is available in the Pdf file Nupeye will give you.

const nupeye = require('nupeye-js');

nupeye.connect(process.env.APP_ID, process.env.API_KEY)
  .then(res => console.log(res))
  .catch(error => console.error(error));

Refresh Token

You need to provide your APP_ID and API_KEY, and the REFRESH TOKEN you will get when your token is expired.

const nupeye = require('nupeye-js');

nupeye.refreshToken(process.env.APP_ID, process.env,API_KEY, refresh_token)
  .then(res => console.log(res))
  .catch(error => console.error(error));

Send OTP

You need to provide the user's user_name, user_password, user_mobile_no, amount and your APP_ID and API_KEY, and the REFRESH TOKEN you get when you logged in.

const nupeye = require('nupeye-js');

nupeye.send_otp(user_name, user_password, user_mobile_no, amount,process.env.APP_ID, process.env,API_KEY, refresh_token)
  .then(res => console.log(res))
  .catch(error => console.error(error));

Resend OTP

You need to provide the user's user_name, user_password, user_mobile_no, amount and your APP_ID and API_KEY, and the REFRESH TOKEN you get when you logged in.

const nupeye = require('nupeye-js');

nupeye.resend_otp(user_name, user_password, user_mobile_no, amount,process.env.APP_ID, process.env,API_KEY, refresh_token)
  .then(res => console.log(res))
  .catch(error => console.error(error));

Payment

You need to provide the user's user_name, user_password, user_mobile_no, amount and your APP_ID and API_KEY, and the REFRESH TOKEN you get when you logged in.

const nupeye = require('nupeye-js');

nupeye.payment(user_name, user_password, user_mobile_no, amount,process.env.APP_ID, process.env,API_KEY, refresh_token, otp_code)
  .then(res => console.log(res))
  .catch(error => console.error(error));