0.0.1 • Published 8 years ago
bold-api v0.0.1
Bold API
NPM
npm install bold-api
Using the API
const Bold = require('bold-api');
const bold = new Bold({
key: '{your-key}'
});
For post requests, include a data object that follows this pattern
const data = {
recipient_id: '54c03ccb5172cc5f1285889e',
wallet_id: '54daac295c15ac2b1144ab2f',
amount: 475.89,
currency: 'USD',
ref_id: 'ID-from-your-system-to-prevent-duplicates'
}
bold.v1.createTransfer(data, (err, response) => {})
Methods available on bold.v1:
//Get single reference
bold.v1.getReference({country: 'US', type: 'individual'}, callback);
//Get all recipients
bold.v1.getRecipients(callback);
//Create simple recipient
bold.v1.createRecipient(data, callback);
//Create KYC recipient
bold.v1.createKYCRecipient(data, callback);
//Get single recipient
bold.v1.getRecipient({id: recipient_id}, callback);
//Update recipient
bold.v1.getRecipient({id: recipient_id, data: {}}, callback);
//Delete recipient
bold.v1.deleteRecipient({id: recipient_id}, callback);
//Get all wallets
bold.v1.getAllWallets(callback)
//Create wallet
bold.v1.createWallet(data, callback);
//Get single wallet
bold.v1.getWallet({id: wallet_id}, callback);
//Update wallet
bold.v1.updateWallet({id: wallet_id}, callback);
//Create transfer
bold.v1.createTransfer(data, callback);
//Get all transfers
bold.v1.getAllTransfers(callback);
//Get single transfer
bold.v1.getTransfer({id: transfer_id}, callback)
Sandbox
To set your API into sandbox mode, pass sandbox: true
in the bold options.
const Bold = require('bold-api');
const bold = new Bold({
key: '{your-key}',
sandbox: true
});
API
For full documentation, check out the official Bold API docs
0.0.1
8 years ago