LogoLogo
  • Welcome!
  • Integrating Klasha
    • Getting Started
    • Prerequisites
    • Integration Checklist
    • Wrap Up
  • Overview
    • Introduction
    • Parameters
    • Token Generation
    • Errors
    • Countries & Payment Methods
  • Accepting Payments
    • Test Payments
    • Payments API
      • Mobile money
      • USSD
    • Payment Link
      • Dashboard
      • Payment Link API
    • Klasha Inline
    • HTML Checkout
  • PLUGINS AND SDKS
    • Plugins
    • Mobile SDKs
    • Web SDKs
  • MISC
    • Transaction Status
    • Webhook
    • API Status
  • Features
    • One-time Payments
    • Recurrent Payment
  • Transfers
    • Payout
      • ZAR Payout(new encryption)
      • KES Payout(new encryption)
      • ZMW Payout(new encryption)
      • TZS Payout(new encryption)
      • CNY Payout(new encryption)
    • Klasha Wire API
    • Swap API
    • Currency Coverage
  • Bank Account Collection
    • Virtual Account Creation
    • VA balance and statement
    • Business Identification Service
Powered by GitBook
On this page
  • Summary
  • Integration steps
  • Encryption algorithm here
  • Get Bank Lists
  • Make a GET call to the Bank List API
  • Resolve Bank Account (Not Available)
  • Make a POST call to the resolve account API
  • Merchant Payout request
  • Make a POST call to the Merchant payout request API
  • Query payout status
  1. Transfers
  2. Payout

KES Payout(new encryption)

PreviousZAR Payout(new encryption)NextZMW Payout(new encryption)

Last updated 2 months ago

Summary

These APIs are used to initiate a KES payout

Before you begin!

  • Find your keys on the Klasha Dashboard → Settings → Generate API Keys ()

Integration steps

Get Bank Lists

Make a GET call to the Bank List API

GET {{env_url}}/wallet/merchant/bank/transfer/request/banks/KES?type=mobile-money

Headers

Key
Value

Content-Type

application/json

Authorization

Bearer <token here>

{
    "message": "success",
    "error": null,
    "data": [
        {
            "code": "M-PESA",
            "name": "M-PESA - MOBILE MONEY"
        },
        {
            "code": "AIRTEL",
            "name": "AIRTEL"
        }
    ]
}

Resolve Bank Account (Not Available)

Make a POST call to the resolve account API

POST {{env_url}}/wallet/merchant/bank/transfer/request/resolve/account

Headers

Key
Value

Context-Type

application/json

Authorization

Bearer <token here>

Request Body

Name
Type
Description

bankCode*

430000

countryCode*

KE

accountNumber*

0690000032

accountType*

personal

documentType*

String

Customer’s mode of identity. This could be one of: [identityNumber, passportNumber, businessRegistrationNumber]

businessId*

String

133

documentNumber*

String

8801235111088

{
    "status": true,
    "message": "Personal Account Verification attempted",
    "data": {
        "verified": true,
        "verificationMessage": "Account is verified successfully"
    }
}
This error occurs when the account number cannot be verified
{"error":"Bad request"}
This error occurs when the right "countryCode" is not passed in
{
    "message": "Operation not allowed.",
    "error": "Operation not allowed",
    "data": null
}

Merchant Payout request

Make a POST call to the Merchant payout request API

POST {{env_url}}/wallet/merchant/{businessId}/bank/transfer/v2/request

You would need to pass, as a header the x-auth-token. This can be obtained from your merchant dashboard → Settings → Generate API keys → Merchant public key.

Headers

Key
Value

Content-Type

application/json

x-auth-token

Your merchant public key

Authorization

Bearer <token here>

Request body (encrypted):

{ 
  "message": "encrypted-request-body"
}

Request body (plain)

Request Body

Name
Type
Description

country*

KE

bankCode*

430000

amount*

100

accountName*

Sydney Mark

requestId*

String

kbtr-3857-011-133-166993253334816

description*

String

Payout

currency*

String

KES

bankName*

String

Ubank Ltd

accountNumber*

String

0690000032

serviceCode*

String

The short code of beneficiary bank account

{
    "id": 3,
    "amount": 1000,
    "payoutStatus": "PENDING",
    "requestId": "kbtr-3857-011-133-166993253334816",
    "narration": "certification",
    "country": "KE",
    "fee": 25,
    "serviceCode": "009",
    "bankCode": "430000",
    "bankName": "Ubank Ltd",
    "accountNumber": "0690000032",
    "accountName": "Pastor Bright"
}
{
    "message": "A human readable error message",
    "error": "Bad Request",
    "data": null
}

Query payout status

Make a to fetch status of initiated payouts.

here
Token Generation
Encryption algorithm here
call