Language

Step 3A: Create a ‘blind’ transfer

Create a transfer by specifying the amount but NOT the destination of where your funds will be transferred to. In this case, funds will be sent to your pre-configured preferred settlement locations as per your Kopo Kopo account. This is why it is called a blind transfer.

POST https://sandbox.kopokopo.com/settlement_transfers
Accept: application/json
Content-Type: application/json
Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q
{
  "destination_type": null,
  "destination_reference": null,
  "amount": {
    "currency": null,
    "value": null
  },
  "_links": {
    "callback_url": "https://your-call-bak.yourapplication.com/transfer_result"
  }
}

HTTP/1.1 201 Created
Location: https://sandbox.kopokopo.com/settlement_transfers/d76265cd-0951-e511-80da-0aa34a9b2388
blind_transfer_params = { 
  destination_reference: '',
  destination_type: '',
  currency: 'currency',
  value: 'value',
  callback_url: 'https://webhook.site/437a5819-1a9d-4e96-b403-a6f898e5bed3',
}

# Using K2Connect - https://github.com/kopokopo/k2-connect-ruby (Recommended)
transfer = K2Transfer.new('Access Token')
transfer.transfer_funds(blind_transfer_params)
transfer.location_url # => "https://sandbox.kopokopo.com/api/v1/settlement_transfers/d76265cd-0951-e511-80da-0aa34a9b2388"
var transferOpts = {
  accessToken: 'myRand0mAcc3ssT0k3n',
  callbackUrl: 'https://your-call-bak.yourapplication.com/transfer_result'
}

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

TransferService
  .settleFunds(transferOpts)
  .then(response => {
    console.log(response) // => 'https://sandbox.kopokopo.com/api/v1/settlement_transfers/d76265cd-0951-e511-80da-0aa34a9b2388'
  })
  .catch(error => {
    console.log(error)
  })
 request_body = {
   "access_token": TransferTestCase.ACCESS_TOKEN,
   "callback_url": 'https://webhook.site/52fd1913-778e-4ee1-bdc4-74517abb758d',
   "value": '10',
 }

# Using Kopo Kopo Connect - https://github.com/kopokopo/k2-connect-python (Recommended)
k2connect.initialize(CLIENT_ID, CLIENT_SECRET, BASE_URL)
transfer_service = k2connect.Transfers

transfer_location_url = transfer_service.settle_funds(request_body)
transfer_location_url # => 'https://sandbox.kopokopo.com/api/v1/settlement_transfers/d76265cd-0951-e511-80da-0aa34a9b2388'
<?
//  Using Kopo Kopo Connect - https://github.com/kopokopo/k2-connect-php (Recommended)
$transfer = $k2->SettlementTransferService();

$requestBody = [
  'callbackUrl' => 'https://your-call-bak.yourapplication.com/transfer_result',
  'accessToken' => 'myRand0mAcc3ssT0k3n'
];

$response = $transfer->settleFunds($options);
echo $response; // => 'https://sandbox.kopokopo.com/api/v1/settlement_transfers/d76265cd-0951-e511-80da-0aa34a9b2388'