CoopPesalink class

This package contains methods that make it easy to consume Co-op Bank Pesalink Api. It requires baseAccountNo, the account number that initiates the transactions.


For all requests, the 400 http response is for INVALID/MISSING PARAMETER where the MessageCode is -2, MESSAGE REFERENCE LONGER THAN ALLOWED LENGTH where the MessageCode is -11 and looks like

{
  "MessageReference": "40ca18c6765086089a1",
  "MessageDateTime": "2017-12-04T09:27:00",
  "MessageCode": "-2",
  "MessageDescription": "INVALID/MISSING PARAMETER"
}

Constructors

Properties

accountBalanceUrl String
getter/setter pair
accountValidationUrl String
getter/setter pair
applicationMode ApplicationMode
final
baseAccountNo String
final
branchCode String?
final
currency String
final
exchangeRateUrl String
getter/setter pair
fullStatementUrl String
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
iftUrl String
getter/setter pair
miniStatementUrl String
getter/setter pair
pesaLinkUrl String
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toMpesaUrl String
getter/setter pair
toPesaLinkAccountUrl String
getter/setter pair
toPesaLinkPhoneUrl String
getter/setter pair
transactionStatusUrl String
getter/setter pair
transactionsUrl String
getter/setter pair

Methods

accountBalance({required String referenceNumber, required String accessToken}) Future<BankReponse>
accountBalance gets all balances of the baseAccountNo
accountValidation({required String referenceNumber, required String accountNumber, required String accessToken}) Future<BankReponse>
accountValidation validates if the given account accountNumber is valid
exchangerate({required String referenceNumber, required String fromCurrencyCode, required String toCurrencyCode, required String accessToken}) Future<BankReponse>
exchagerate gets the exchange rate from one currency fromCurrencyCode to the other toCurrencyCode Sample success response
fullStatement({required String referenceNumber, required DateTime startDate, required DateTime endDate, required String accessToken}) Future<BankReponse>
fullStatement Fetches the baseAccountNo full statement that is between the dates passed startDate, & endDate It has a return type of BankReponse & the raw response can be gotten by calling BankReponse.rawResponceBody The list of transactions as List of BankTransactionModel can be gotten by calling BankReponse.transactions
ift({required String referenceNumber, required String accountNumber, required double amount, required String callBackUrl, String transactionCurrency = 'KES', required String transactionDescription, required String accessToken}) Future<BankReponse>
Implements InterFundsTransfer(IFT) end point, which enables transactions from the configured account baseAccountNo to s co-op bank account It has a return type of BankReponse & the raw response can be gotten by calling BankReponse.rawResponceBody Sample success response;
miniStatement({required String referenceNumber, required String accessToken}) Future<BankReponse>
miniStatement Fetches the baseAccountNo recent transactions It has a return type of BankReponse & the raw response can be gotten by calling BankReponse.rawResponceBody The list of transactions as List of BankTransactionModel can be gotten by calling BankReponse.transactions
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Implements Pesalink end point, which enables transactions from the configured account baseAccountNo to any bank account participating in IPSL It has a return type of BankReponse & the raw response can be gotten by calling BankReponse.rawResponceBody Sample success response;
toMpesa({required String referenceNumber, required String mobileNumber, required double amount, required String callBackUrl, String transactionCurrency = 'KES', required String transactionDescription, required String accessToken}) Future<BankReponse>
Implements send to Mpesa end point, which enables transactions from the configured account baseAccountNo to mpesa user(phone number)mobileNumber It has a return type of BankReponse & the raw response can be gotten by calling BankReponse.rawResponceBody Sample success response;
toPesalinkAccount({required String referenceNumber, required String accountNumber, required String bankCode, required double amount, required String callBackUrl, String transactionCurrency = 'KES', required String transactionDescription, required String accessToken}) Future<BankReponse>
Implements Send to Pesalink Account end point, which enables transactions from the configured account baseAccountNo to bank account number with pesalink enabled It has a return type of BankReponse & the raw response can be gotten by calling BankReponse.rawResponceBody Sample success response;
toPesalinkPhoneNo({required String referenceNumber, required String phoneNumber, required double amount, required String callBackUrl, String transactionCurrency = 'KES', required String transactionDescription, required String accessToken}) Future<BankReponse>
Implements Send to Pesalink PhoneNo end point, which enables transactions from the configured account baseAccountNo to user whom has connected their phoneNumber to bank account using pesalink It has a return type of BankReponse & the raw response can be gotten by calling BankReponse.rawResponceBody Sample success response;
toString() String
A string representation of this object.
inherited
trancations({required String referenceNumber, required int noOfTransactions, required String accessToken}) Future<BankReponse>
trancations Fetches the baseAccountNo last n transctions, where n is the number of transactions noOfTransactions It has a return type of BankReponse & the raw response can be gotten by calling BankReponse.rawResponceBody The list of transactions as List of BankTransactionModel can be gotten by calling BankReponse.transactions
transactionSource(double amount, String naration) Map<String, dynamic>
transactionStatus({required String referenceNumber, required String accessToken}) Future<BankReponse>
transactionStatus checks the status of a previous transaction with this referenceNumber

Operators

operator ==(Object other) bool
The equality operator.
inherited