Language

Step 2: Create a Verified Settlement Account via API

You can create settlement accounts by either

  • Logging into your Kopo Kopo merchant account and adding settlement accounts in the Account Settings section or
  • Via the Kopo Kopo Connect API as detailed below.

We will create a Bank Account

The following information is required for a Verified Bank Account. In this example we will be creating a Merchant Bank Account as a destination of your funds.

POST https://sandbox.kopokopo.com/merchant_bank_accounts
Content-Type: application/json
Accept: application/json
Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q
{
  "account_name": "Jane Merchant",
  "bank_ref": "9ed38155-7d6f-11e3-83c3-5404a6144203",
  "bank_branch_ref": "9ed38155-7d6f-11e3-83c3-5404a6144203",
  "account_number": "1234567890",
  "settlement": "EFT"
}

HTTP/1.1 201 Created
Location: https://sandbox.kopokopo.com/merchant_bank_accounts/AB443D36-3757-44C1-A1B4-29727FB3111C
settlement_account = {
  type: 'merchant_bank_account',
  account_name: 'account_name',
  bank_branch_ref: 'bank_branch_ref',
  account_number: 'account_number',
  settlement_method: 'settlement_method'
}

# Using K2Connecct - https://github.com/kopokopo/k2-connect-ruby (Recommended)
k2_settlement.add_settlement_account(settlement_account)
k2_settlement.location_url # => "https://sandbox.kopokopo.com/api/v1/merchant_wallets/AB443D36-3757-44C1-A1B4-29727FB3111C"
var requestBody = {
  account_name: 'Jane Merchant',
  bank_ref: '9ed38155-7d6f-11e3-83c3-5404a6144203',
  bank_branch_ref: '9ed38155-7d6f-11e3-83c3-5404a6144203',
  account_number: '1234567890'
};

appToken
  .post('merchant_bank_accounts', requestBody)
  .then(res => res.headers.get('location')); // => 'https://sandbox.kopokopo.com/merchant_bank_accounts/AB443D36-3757-44C1-A1B4-29727FB3111C'
# Using K2Connect - https://github.com/kopokopo/k2-connect-python (Recommended)
k2connect.initialize(CLIENT_ID, CLIENT_SECRET, BASE_URL)
transfer_service = k2connect.Transfers

# create verified settlement mobile account

request_body ={
  "access_token": ACCESS_TOKEN,
  "first_name": 'py_sdk_first_name',
  "last_name": 'py_sdk_last_name',
  "phone_number": '+254911222538',
  "network": 'Safaricom'
}

mobile_settlement_account = transfer_service.add_mobile_wallet_settlement_account(request_body)
mobile_settlement_account # => "https://sandbox.kopokopo.com/api/v1/merchant_wallets/AB443D36-3757-44C1-A1B4-29727FB3111C"
//Implement PHP example
//Implement Java example

When the bank account is created, you’ll receive the merchant bank account URL in the location header.