Getting Started
Request Format
All endpoints use JSON-RPC 2.0 over HTTPS POST. The
URL picks the endpoint group, and method in the body picks the operation, written as
procedure@operation.
Request
json
{
"jsonrpc": "2.0",
"method": "transactions@commitTransaction",
"params": { "transaction_id": "in8679EF2DCC" },
"id": "a3f1c2"
}| Field | Type | Required | Description |
|---|---|---|---|
jsonrpc | string | Yes | Always "2.0". |
method | string | Yes | Operation to call, for example transactions@logMobileTranscation. |
params | object | Yes | Parameters for the operation. Send {} if there are none. |
id | string | Yes | Your request ID. It is echoed back in the response. |
Success Response
json
{
"jsonrpc": "2.0",
"result": { "...": "..." },
"id": "a3f1c2"
}Error Response
json
{
"jsonrpc": "2.0",
"error": { "code": 400, "message": "Can only send KES or USD" },
"id": "a3f1c2"
}Warning: Some business outcomes, such as a duplicate transaction (409), return inside
result with their own status code, not as a JSON-RPC error. See Errors.
Method Names
Note: The method names logBankTranscation, logMobileTranscation and logCashTranscation
are spelled Transcation, not Transaction. Use them exactly as written.
| Endpoint path | Methods |
|---|---|
/login | login@loginWithUsernameAndPassword |
/getCountries | getCountries@getCountries |
/getConversionRateFeeAndAmount | rates@getConversionRateFeeAndAmount |
/banks | banks@getAllBanks |
/getSubscriberDetails | subscriber@getMobileSubscriberDetails, subscriber@getBankSubscriberDetails |
/transactions | transactions@logMobileTranscation, transactions@logBankTranscation, transactions@logCashTranscation, transactions@commitTransaction, transactions@checkTransactionStatus, transactions@getTransactionByRequestId, transactions@cancelTransaction |
/account | accounts@getAccountBalance |
/reports | history@getTransactionsHistory, history@getWalletHistory |
Data Formats
- Dates (date of birth, ID issue/expiry):
yyyymmdd, for example19900415. - Phone numbers: international format without
+, for example254712345678. - Country codes: ISO 3166-1 alpha-2, for example
KE. - Currency codes: ISO 4217, for example
KES,USD. - Amounts: numbers with at most 2 decimal places.