The library follows an object-oriented approach and methods are grouped under categories.
There are currently eleven (11) base categories namely:
- Customer
- Collections
- Transfer
- Bills
- Wallets
- Issuing
- Transactions
- Counterparty
- Forex
- Institutions
- Misc
Learn more from the docs
$ npm install maplerad-node
or
$ yarn add maplerad-node
A secret key is needed for authorization. It can be gotten from the Maplerad dashboard
Maplerad provides two environments to ensure a smooth and easy experience.
- sandbox: for development
- live: for production
Sandbox is your playground. You can credit your test wallets and use that to test your integrations, no real money will be debited or credited. Ensure to switch to Live when you are ready to launch.
All method calls under Live will be charged and real money will be debited or credited. You are advised to use this when you have fully tested your integrations and are ready to launch your product.
// import the package
const Maplerad = require("maplerad-node") // commonjs
// or
import Maplerad from "maplerad-node" // esm
const SECRET_KEY = process.env.SECRET_KEY
const ENVIRONMENT = "sandbox"
const client = new Maplerad(SECRET_KEY, ENVIRONMENT)
// Get a customer
async function getAllCustomers(){
try{
const customers = await client.Customers.GetAllCustomers()
console.log(customers)
}catch (error){
console.error(error)
}
}