Language

Step 2: Create a payment

Creates a transfer by debiting your Kopo Kopo merchant account and sending funds to the recipients transfer account (bank account or mobile wallet).

Fees

Move Money MethodFees in KSh
To Bank Account50
To Mobile Wallet50
To Mpesa Till50
To Mpesa Paybill50

Request and response

mobile_input = { 
    destination_reference: "c7f300c0-f1ef-4151-9bbe-005005aa3747",
    destination_type: "mobile_wallet",
    currency: "KES",
    value: 20000,
    description: "Salary payment for May 2018",
    category: "salaries",
    tags: ["tag 1", "tag 2"],
    callback_url: "https://webhook.site/437a5819-1a9d-4e96-b403-a6f898e5bed3",
    metadata: {
        customerId: '8_675_309',
        notes: 'Salary payment for May 2018'
    }
}

# Using K2Connect - https://github.com/kopokpo/k2-connect-ruby (Recommended)
k2_pay = K2Pay.new('your_access_token')
k2_pay.create_payment(mobile_input)
k2_pay.payments_location_url # => "https://sandbox.kopokopo.com/api/v1/payments/d76265cd-0951-e511-80da-0aa34a9b2388"