Giter Club home page Giter Club logo

cooperativebank-kenya-java-sdk's Introduction

cooperative bank kenya

cooperative bank kenya java sdk

This is a Java wrapper for the cooperative bank coop connect api

Installation

Requirements

  • Java 1.8 or later

Others

-Create an account at the coop connect developer portal and create an application in order to get your CONSUMER KEY and CONSUMER SECRET credentials also remember to subscribe to the APIS you would wish to use in the developer portal

Usage

Initialization

Bank bank = new Bank("CONSUMER KEY", "CONSUMER_SECRET", Constants.sandbox );

NB remember to change to Constants.live when going live

Account Balance

Account Balance Enquiry API will enable you to enquire about your own Co-operative Bank accounts' balance as at now for the specified account number

EXAMPLE

AccountBalance response = bank.getAccountBalance("MESSAGE REFERENCE", "ACCOUNT NUMBER");

Account Full Statement

Account Full Statement Enquiry API will enable you to enquire about your own Co-operative Bank accounts' full statement for the specified account number, start date and end date

EXAMPLE

 AccountFullStatement response = bank.getAccountFullStatement("MESSAGE REFERENCE", "ACCOUNT NUMBER", "STARTDATE", "ENDDATE");

Account Mini Statement

Account Mini Statement Enquiry API will enable you to enquire about your own Co-operative Bank accounts' Mini statement for the specified account number

EXAMPLE

AccountMiniStatement response = bank.getAccountMiniStatement("MESSAGE REFERENCE", "ACCOUNT NUMBER");

Account Transactions

Account Transactions Enquiry API will enable you to enquire about your own Co-operative Bank accounts' latest transactions for the specified account number and number of transactions to be returned

EXAMPLE

 AccountTransactions response = bank.getAccountTransactions("MESSAGE REFERENCE", "ACCOUNT NUMBER", NUMBER OF TRANSACTIONS);

Account Validation

Account Validation Enquiry API will enable you to validate a Co-operative Bank account number

EXAMPLE

AccountValidation response = bank.validateAccount("MESSAGE REFERENCE", "ACCOUNT NUMBER" );

Exchange rate

Exchange Rate Enquiry API will enable you to enquire about the current SPOT exchange rate for the specified currencies

EXAMPLE

ExchangeRate response = bank.getExchangeRate("MESSAGE REFERENCE", "FROM CURRENCY CODE", "TO CURRENCY CODE" );

Internal Funds Transfer Account ToAccount

Internal Funds Transfer Account to Account API will enable you to transfer funds from your own Co-operative Bank account to other Co-operative Bank account(s)

EXAMPLE

ArrayList<DestinationIftAccountToAccount> list = new ArrayList<>();
list.add(new DestinationIftAccountToAccount("REFERENCE NUMBER", "ACCOUNT NUMBER","AMOUNT" , "TRANSACTION CURRENCY", "NARRATION"));

IftAccountToAccount response = bank.transferIftAccountToAccount("MESSAGE REFERENCE", "CALLBACK URL", new Source("ACCOUNT NUMBER", "AMOUNT", "TRANSACTION CURRENCY", "NARRATION"), list);

PesaLink To Account

PesaLink Send to Account Funds Transfer API will enable you to transfer funds from your own Co-operative Bank account to Bank account(s) in IPSL participating banks

EXAMPLE

 ArrayList<DestinationPesaLinkToAccount> list = new ArrayList<>();
list.add(new DestinationPesaLinkToAccount("REFERENCE NUMBER", "ACCOUNT NUMBER","AMOUNT" , "TRANSACTION CURRENCY", "NARRATION"));

PesaLinkToAccount response = bank.transferFromPesaLinkToAccount("MESSAGE REFERENCE", "CALLBACK URL", new Source("ACCOUNT NUMBER", "AMOUNT", "TRANSACTION CURRENCY", "NARRATION"), list);

PesaLink To Phone

PesaLink Send to Phone Funds Transfer API will enable you to transfer funds from your own Co-operative Bank account to a Phone Number(s) linked to a Bank account in an IPSL participating bank

EXAMPLE

ArrayList<DestinationPesaLinkSendToPhone> list = new ArrayList<>();
list.add(new DestinationPesaLinkSendToPhone("REFERENCE NUMBER", "PHONENUMBER","AMOUNT" , "TRANSACTION CURRENCY", "NARRATION"));

PesaLinkSendToPhone response = bank.transferFromPesaLinkToPhone("MESSAGE REFERENCE", "CALLBACK URL", new Source("ACCOUNT NUMBER", "AMOUNT", "TRANSACTION CURRENCY", "NARRATION"), list);
       

Send To Mpesa

Send to M-Pesa Funds Transfer API will enable you to transfer funds from your own Co-operative Bank account to an M-Pesa account recipient

EXAMPLE

 ArrayList<DestinationMpesa> list = new ArrayList<>();
 list.add(new DestinationMpesa("REFERENCE NUMBER", "PHONENUMBER","AMOUNT" , "TRANSACTION CURRENCY", "NARRATION"));

 SendToMpesa response = bank.sendToMpesa("MESSAGE REFERENCE", "CALLBACK URL", new Source("ACCOUNT NUMBER", "AMOUNT", "TRANSACTION CURRENCY", "NARRATION"), list);
      

Transaction Status

Transaction Status Enquiry API will enable you to enquire about the status of a previously requested transaction for the specified transaction message reference

EXAMPLE

 TransactionStatus response = bank.checkTransactionStatus("MESSAGE REFERENCE");

Going Live

When ready to go live with your app/service send an email to [email protected] indicating the intention to go live. A representative will send you test cases for your application to test out and a merchant form which you will have to fill out in corder to comply with KYC requirements. In addition they will whitelist your ip in order to enable you to receive call back requests for reconcilliation with your system.

Other SDKS

php

Help & Support

For any queries, help with integration or just general feedback ๐Ÿ‘

-Email [email protected]

cooperativebank-kenya-java-sdk's People

Contributors

isaacsichangi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

tapfumamanhanga

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.