The CCS API is currently free to use and you only need to put a link back to our website using the code below (preferably right under your CCS calculator):

Powered by CCS API © Child Care Subsidy Calculator

Below this line is the API code. --------------------------------------------------------------------------------------------- "45", // change 45 to your actual number. For Higher CCS this should be at least 8 hours. // Family Adjusted Taxable Income // If the user knows their CCS Percentage please set the family_income to 0. Then set the ccs_percent below to the actual CCS Percentage they enter. "family_income" => "155000", // change 155000 to your actual number // Standard Child Care Subsidy Percentage // If the user knows their CCS Percentage please set the ccs_percent below to the actual CCS Percentage they enter. // If you set the $family_income value to a NON ZERO value, you don't need to set the $ccs_percent "ccs_percent" => "0", // change 0 to your actual number // Centre Based Day Care Session (Daily) Hours "session_hours" => "10", // change 10 to your actual number // Centre Based Day Care Session (Daily) Fees "session_fees" => "120", // change 120 to your actual number // Centre Based Day Care Sessions (Days) per Week "sessions_per_week" => "5", // change 5 to your actual number // Centre Based Day Care Yearly Weeks "enrolled_weeks" => "50", // change 50 to your actual number // Is the child attending school? "attending_school" => "No", // change No to your actual option (Yes or No). For Higher CCS this should be No. // Is the child attending preschool at a Centre Based Day Care service? "attending_early_educational_program" => "No", // change No to your actual option (Yes or No). For Higher CCS this should be No. // If you don't set the $higher_CCS_eligibility, it will be treated as No "higher_CCS_eligibility" => $higher_CCS_eligibility, // CCS API Key "ccsapikey" => "Your CCS Calculator API Key" // change this to the actual API Key you have. You can get your API key from https://www.childcaresubsidycalculator.net.au/getapikey.html. ); $data_string = json_encode($data); // call the CCS API $ch = curl_init('https://www.childcaresubsidycalculator.net.au/api/ccscapi.php'); // If you need to call the Higher CCS API you can un-comment the line below and comment the line above. // $ch = curl_init('https://www.childcaresubsidycalculator.net.au/api/enhancedccscapi.php'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string)) ); $result = curl_exec($ch); // display result JSON. Need to comment the below line out when implementing the API // echo $result; // display result JSON in HTML Table class Foo { public static function jsonToDebug($jsonText = '') { $arr = json_decode($jsonText, true); $html = ""; if ($arr && is_array($arr)) { $html .= self::_arrayToHtmlTableRecursive($arr); } return $html; } private static function _arrayToHtmlTableRecursive($arr) { $str = ""; foreach ($arr as $key => $val) { $str .= ""; $str .= ""; $str .= ""; } $str .= "
" . str_replace("_"," ",ucwords($key)) . ""; if (is_array($val)) { if (!empty($val)) { $str .= self::_arrayToHtmlTableRecursive($val); } } else { $str .= "\$" . $val . ""; } $str .= "
"; return $str; } } // Need to comment the below line out when implementing the API // echo Foo::jsonToDebug($result); ?>