Language

Step 7: Check the status of your transfer

You can check the status of the newly your newly created transfer by retrieving the transfer by its URL.

GET https://sandbox.kopokopo.com/api/v1/settlement_transfers/d76265cd-0951-e511-80da-0aa34a9b2388
Accept: application/json
Authorization: Bearer pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY

...

{
  "data": {
    "id": "01aece24-e596-4f5c-9ace-9eb1a0939dda",
    "type": "settlement_transfer",
    "attributes": {
      "status": "Processed",
      "created_at": "2021-01-27T10:57:09.838+03:00",
      "amount": {
        "currency": "KES",
        "value": null
      },
      "transfer_batches": [
        {
          "status": "Transferred",
          "disbursements": [
            {
              "amount": "19900.0",
              "status": "Transferred",
              "destination_type": "Mobile Wallet",
              "origination_time": "2021-01-06T12:42:36.000+03:00",
              "destination_reference": "17067bf7-648e-424c-af0f-8c541a1b4ec3",
              "transaction_reference": "LDLJANAPH26"
            }
          ]
        },
        {
          "status": "Transferred",
          "disbursements": [
            {
              "amount": "24452.0",
              "status": "Transferred",
              "destination_type": "Bank Account",
              "origination_time": "2021-01-27T10:57:58.623+03:00",
              "destination_reference": "34a273d1-fedc-4610-8ab6-a1ba4828f317",
              "transaction_reference": null
            },
            {
              "amount": "25000.0",
              "status": "Transferred",
              "destination_type": "Bank Account",
              "origination_time": "2021-01-27T10:57:58.627+03:00",
              "destination_reference": "34a273d1-fedc-4610-8ab6-a1ba4828f317",
              "transaction_reference": null
            }
          ]
        }
      ],
      "_links": {
        "callback_url": "https://webhook.site/3856ff77-93eb-4130-80cd-e62dc0db5c1a",
        "self": "https://sandbox.kopokopo.com/api/v1/settlement_transfers/01aece24-e596-4f5c-9ace-9eb1a0939dda"
      }
    }
  }
}
transfer_url = 'https://sandbox.kopokopo.com/settlement_transfers/d76265cd-0951-e511-80da-0aa34a9b2388'

# Using Kopo Kopo Connect - https://github.com/kopokopo/k2-connect-ruby (Recommended)
k2_transfer = K2Transfer.new('Access Token')
# Check specific transfer transaction
k2_transfer.query_resource(transfer_url)
<?
//  Using Kopo Kopo Connect - https://github.com/kopokopo/k2-connect-php (Recommended)
$transfer = $K2->SettlementTransferService();

$options = [
  'location' => 'https://sandbox.kopokopo.com/api/v1/settlement_transfers/d76265cd-0951-e511-80da-0aa34a9b2388',
  'accessToken' => 'myRand0mAcc3ssT0k3n',
];
$response = $transfer->getStatus($options);

echo $response;
transfer_url = 'https://sandbox.kopokopo.com/settlement_transfers/d76265cd-0951-e511-80da-0aa34a9b2388'

# 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_service.transfer_transaction_status(ACCESS_TOKEN, transfer_url)
//  Using Kopo Kopo Connect - https://github.com/kopokopo/k2-connect-node (Recommended)
var TransferService = K2.TransferService
var transferUrl = 'https://sandbox.kopokopo.com/api/v1/settlement_transfers/d76265cd-0951-e511-80da-0aa34a9b2388'

TransferService
  .getStatus({accessToken: 'myRand0mAcc3ssT0k3n', location: transferUrl)
  .then(response => {
    console.log(response)
  })
  .catch(error => {
    console.log(error)
  })

That’s it! You’ve successfully transferred money from Joe Buyer to Jane Merchant. Please continue to the Webhooks guide for information on implementing notifications for your customers about the transfer.