Language

Step 4: Send Money to my accounts (Blind transfer)

Sweep all available funds from your Kopo Kopo account to the transfer accounts linked to your company and tills.

POST https://sandbox.kopokopo.com/api/v2/send_money
Accept: application/json
Content-Type: application/json
Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q
{
  "currency": "KES",
  "metadata": {
    "customerId": "8675309",
    "notes": "Salary payment for September 2025"
  },
  "_links": {
    "callback_url": "https://dummy_callback_url/send_money_result"
  }
}
transfer_request = {
  destinations: [],
  currency: "KES",
  source_identifier: nil,
  metadata: {
    "customerId": "8675309",
    "notes": "Payment for September 2025"
  },
  callback_url: 'callback_url',
}

# Using K2Connect - https://github.com/kopokopo/k2-connect-ruby (Recommended)
send_money = K2ConnectRuby::K2Entity::SendMoney.new('your_access_token')
send_money.create_payment(transfer_request)
send_money.payments_location_url # => "https://sandbox.kopokopo.com/api/v2/send_money/d76265cd-0951-e511-80da-0aa34a9b2388"
var sendMoneyOpts = {
  currency: 'KES',
  metadata: {
    customerId: '8675309',
    notes: 'Payment for September 2025'
  },
  callbackUrl: 'https://dummy_callback_url/send_money_result',
  accessToken: 'myRand0mAcc3ssT0k3n'
}

//  Using Kopo Kopo Connect - https://github.com/kopokopo/k2-connect-node (Recommended)
const SendMoneyService = K2.SendMoneyService

SendMoneyService.sendMoney(sendMoneyOpts)
  .then((response) => {
    console.log(response) // => 'https://sandbox.kopokopo.com/api/v2/send_money/d76265cd-0951-e511-80da-0aa34a9b2388
  })
  .catch((error) => {
    console.error(error);
  });
send_money_request = {
    "currency": "KES",
    "metadata": {
      "customerId": "8675309",
      "notes": "Payment for September 2025"
    },
    "callback_url": "https://callback_to_your_app.your_application.com"
}

# Using K2 Connect - https://github.com/kopokopo/k2-connect-python (Recommended)
k2connect.initialize(environ.get('CLIENT_ID'), environ.get('CLIENT_SECRET'), 'http://127.0.0.1:3000/')
send_money_service = k2connect.SendMoney(access_token=access_token)
send_money_location_url = send_money_service.create_payment(
  send_money_request)  # => 'https://sandbox.kopokopo.com/api/v2/send_money/d76265cd-0951-e511-80da-0aa34a9b2388'
<?
//  Using Kopo Kopo Connect - https://github.com/kopokopo/k2-connect-php (Recommended)
$sendMoneyService = $k2->SendMoneyService();

$sendMoneyRequest = [
  "currency" => "KES",
  "metadata" => [
    "notes" => "Salary payment for September 2025"
  ],
  "callbackUrl" => "https://dummy_callback_url/send_money_result",
  "accessToken" => "myRand0mAcc3ssT0k3n"
];

// For Kopo Kopo API applications, an accessToken can be used for this endpoint. (https://api-docs.kopokopo.com/#application-authorization)
$response = $sendMoneyService->sendMoney($sendMoneyRequest);
print_r($response); // Array([status] => success, [location] => https://sandbox.kopokopo.com/api/v2/send_money/cb95aa2d-cd7f-4c9f-9d16-a2eb1a7fef42)
// Not Supported
// This feature is not currently available in the Flutter SDK.
// Please use one of the other SDKs (PHP, Ruby, Python, NodeJs) or the REST API.