API Reference

Create payout

Use the Payout endpoint to make payments to multiple Safacil Pay recipients. The Payout endpoint is a fast, convenient way to send commissions, rebates and rewards.

POST : https://safacilpay.com/sandbox/payout

Request Body

NameType
amountInt
phoneInt

<?php $url = "https://safacilpay.com/sandbox/payout"; $data = array("amount" => 10, "phone" => "50943000000"); $token = "YOUR TOKEN"; $ch = curl_init($url); // Set options curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); // Set the headers including the Bearer token curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/x-www-form-urlencoded', 'Authorization: Bearer '. $token )); $response = curl_exec($ch); // Check for errors if(curl_errno($ch)) { echo 'Request Error:' . curl_error($ch); } // Close the cURL session curl_close($ch); // Decode the JSON response $responseData = json_decode($response, true); echo $response; ?>

On the sandbox environment, you must use this number 50943000000


Response : { "message": "successful", "beneficiary": "50900000000", "amount": "10", "status": 200, "date": 0000-00-00 00:00:00 }