SeerBit NodeJS SDK for easy integration with SeerBit's API.
The Library supports all APIs under the following services:
- standard checkout
- recurrent payment
- pre-auth payment
- mobile money payment
- card payments
- order service
- Node 14 or higher
npm install --save seerbit-nodejs
OR
yarn add --save seerbit-nodejs
OR
pnpm install --save seerbit-nodejs
Your merchant account token can be generated following the guides here
const {Client, Config, StandardCheckout} = require("seerbit-nodejs");
const {SeerBitConfig} = require("../config");
const config = new Config(
{
publicKey: SeerBitConfig.PUBLIC_KEY,
secretKey: SeerBitConfig.SECRET_KEY,
bearerToken: SeerBitConfig.TOKEN
});
const client = new Client(config);
const standard = new StandardCheckout(client);
const payload = {
amount:100,
callbackUrl: "www.testapp.com",
country: "NG",
currency: "NGN",
email:"[email protected]",
paymentReference: Date.now()
fullName: "Test Name"
tokenize: false
}
standard.Initialize(payload)
.then(res=>console.log(res))
.catch(e=>console.log(e))
You can find more usage in the samples folder
Property | Type | Required | Desc |
---|---|---|---|
currency | String |
Optional | The currency for the transaction e.g NGN |
String |
Required | The email of the user to be charged | |
fullName | String |
Optional | The fullname of the user to be charged |
country | String |
Optional | Transaction country which can be optional |
amount | String |
Required | The transaction amount in kobo |
publicKey | String |
Required | Your Public key or see above step to get yours |
tokenize | bool |
Optional | Tokenize card |
paymentReference | String or Number |
Required | Set a unique transaction reference for every transaction |
We strongly encourage you to join us in contributing to this repository so everyone can benefit from:
- New features and functionality
- Resolved bug fixes and issues
- Any general improvements
The MIT License (MIT). Please see License File for more information.