payex-api-sdk
v1.0.5
Published
This is a Node.js SDK that maps some of the RESTful methods of payex.io payment gateway.
Downloads
9
Readme
payex-api-sdk
This is an Nodejs/JavaScript SDK that maps some of the RESTful methods of Open API that are documented at payex.io.
Installation
# using npm
npm i payex-api-sdk
# using yarn
upcoming..
Supported APIs
- Get Access Token
- Payment Intents
- Create Payment
- Transactions
- Get All Transactions
SDK API
Import the payex via require
const payex = require("payex-api-sdk");
Initialize a payex instance by using
const payexConfig = {
username: process.env.PAYEX_USERNAME, // email address
password: process.env.PAYEX_SECRET_KEY, // secret key
url: process.env.PAYEX_SANDBOX_API_URL, // sandbox url
};
Access Token Generation - getAccessToken()
To get access token(expired after 2 days) with using provided username
and password
.
const { username, password, url } = payexConfig;
const access_token = await payex().getAccessToken(username, password, url);
console.log(access_token);
to be continued...
please join as a contributor to improve this SDK.