Step 1: Create PAY recipients using the Kopo Kopo API

Your partners (customers, suppliers etc.) have an account or a relationship with your application. Your application holds their bank account or mobile wallet information. You can add Pay recipients directly in your Kopo Kopo merchant account or by using the API as prescribed below.

Step 1A. Obtain an application access token

Your application will exchange its client_id, client_secret, and grant_type=client_credentials for an application access token. An application access token can then be used to make calls to the API on behalf of your application.

Step 1B. Create a PAY recipient

Create a ‘pay recipient’ for every person you would like to make payments to. You can create recipients whose funds destinations are mobile wallets, bank accounts, other Kopo Kopo merchants and other till numbers. More details can be found in the Api docs

Content-Type: application/json
Accept: application/json
Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q
  "type": "mobile_wallet"
  "pay_recipient" : {
    "first_name": "John",
    "last_name": "Doe",
    "email": "",
    "phone_number": "+254999999999",
    "network: "Safaricom"

HTTP/1.1 201 Created
mobile_input = {
    type: "mobile_wallet", 
    first_name: "John", 
    last_name: "Doe", 
    email: "", 
    phone_number: "+254999999999", 
    network: "Safaricom" 

# Using k2-connect -
k2_pay ='your_access_token')
# Mobile wallet recipient
k2_pay.recipients_location_url # => ""
const PayService = K2.PayService

var requestBody = {
  type: 'mobile_wallet',
  firstName: 'John',
  lastName: 'Doe',
  network: 'Safaricom',
  email: '',
  phoneNumber: '+254999999999',
  accessToken: 'myRand0mAcc3ssT0k3n'

  .then(function(res) {
    console.log(response)// => ''
  .catch( error => {

mobile_pay = {
  'access_token': ACCESS_TOKEN,
  'recipient_type': 'mobile_wallet',
  "first_name": "mobile_wallet_first_name",
  "last_name": "mobile_wallet_last_name",
  "phone_number": "+254123456789",
  "network": "mobile_wallet_network",
  "email": ""

# Using k2-connect - (Recommended)
k2connect.initialize(CLIENT_ID, CLIENT_SECRET, BASE_URL)
pay_service = k2connect.Pay

# Add mobile wallet pay recipient
mobile_wallet_resource_url = pay_service.add_pay_recipient(mobile_pay)
$pay = $K2->PayService();

$response = $pay->addPayRecipient([
  'type' => 'mobile_wallet',
  'firstName'=> 'John',
  'lastName'=> 'Doe',
  'email'=> '',
  'phoneNumber'=> '+254999999999',
  'network'=> 'Safaricom',
  'accessToken' => 'myRand0mAcc3ssT0k3n'

if($response['status'] == 'success')
    echo "The resource location is:" . json_encode($response['location']);
//Get Java sample

When the PAY recipient is created, you’ll receive the Pay Recipient URL in the location header.

Please note, PAY recipients can also be created by logging into your Kopo Kopo account and creating them directly in the platform as opposed to via the API.