handaki
v1.0.2
Published
💰HANDAKI API package to help implement direct deposit into users bank account.
Downloads
4
Readme
KOTANIPAY HANDAKI API
💰HANDAKI API package to help implement direct deposit into users bank account.
Only basic endpoints are supported
At this time, the package doesn't support all the endpoints of the Handaki API, as it is made for specific needs of our current operations and will be updated with new endpoints base on new requirements .
Installation
yarn add handaki or
npm install handaki
INSTANTIATE
const handaki = require('handaki');
const request = new handaki.Handeki({
keyId: 'key',
signatureString:'signatureString'
});
CASH OUT TO PHONE NUMBER
const payoutData = {
"type": "payout",
"id": "6bd6119a-d895-402a-9ff8-950e41b62083",
"attributes": {
"recipient_no": "0722000024",
"recipient_type": "msisdn",
"short_code": "511382",
"amount": 10,
"posted_at": "2019-03-18T17:22:09.651011Z",
"recipient_id_type": "national_id",
"recipient_id_number": "21212121"
}
}
await request.payout(payoutData)
CASH IN VIA PHONE NUMBER
const cashInData = {
"type": "charge",
"id": "{{$randomUUID}}",
"attributes": {
"amount": 10,
"customer_no": "254722000022",
"short_code": "174379",
"posted_at": "{{posted_at}}",
"reference": "1234"
}
}
await request.charge(cashInData)
PAY BILL
const payData = {
"type": "charge",
"id": "{{$randomUUID}}",
"attributes": {
"amount": 10,
"customer_no": "254722000022",
"short_code": "174379",
"posted_at": "{{posted_at}}",
"reference": "1234"
}
}
await request.charge(cashInData)
PAY TILL
const payData = {
"type": "charge",
"attributes": {
"amount": 100,
"customer_no": "254722000022",
"short_code": "111222",
"till_no": "112233",
"posted_at": "{{posted_at}}",
"reference": "1234"
}
}
await request.charge(cashInData)