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"
}
FieldTypeRequiredDescription
jsonrpcstringYesAlways "2.0".
methodstringYesOperation to call, for example transactions@logMobileTranscation.
paramsobjectYesParameters for the operation. Send {} if there are none.
idstringYesYour 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 pathMethods
/loginlogin@loginWithUsernameAndPassword
/getCountriesgetCountries@getCountries
/getConversionRateFeeAndAmountrates@getConversionRateFeeAndAmount
/banksbanks@getAllBanks
/getSubscriberDetailssubscriber@getMobileSubscriberDetails, subscriber@getBankSubscriberDetails
/transactionstransactions@logMobileTranscation, transactions@logBankTranscation, transactions@logCashTranscation, transactions@commitTransaction, transactions@checkTransactionStatus, transactions@getTransactionByRequestId, transactions@cancelTransaction
/accountaccounts@getAccountBalance
/reportshistory@getTransactionsHistory, history@getWalletHistory

Data Formats

  • Dates (date of birth, ID issue/expiry): yyyymmdd, for example 19900415.
  • Phone numbers: international format without +, for example 254712345678.
  • 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.
© 2026 Afrisend