MONEY TRANSFER

Key Required Description
method yes Apikey defined to your dashboard
apiKey yes Must be set to depositCreate
uID yes Unique transaction ID
function httpPost($url,$params) {
    $postData = '';
    foreach($params as $k => $v) {
        $postData .= $k . '='.$v.'&';
    }
    rtrim($postData, '&');

    $ch = curl_init();
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    curl_setopt($ch,CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);

    $output=curl_exec($ch);

    curl_close($ch);
    return $output;
}

$data = array(
 'method' => 'depositCreate',
 'apiKey' => 'd6a67356bbaf431b2f8c09198e5bbd82',
 'callbackUrl' => 'https://site.com/depositResponse',
 'uID' => time(),
);
$response = httpPost('https://cuzdanpay.com//api', $data);
Key Description
status Investment result (true/false)
code Investment result code
hash Investment result code
uID The unique uID sent in the first request
saleID Receipt ID
amount Investment amount
Array (
        [status] => 1
        [code] => 200
        [message] => Payment accepted.
        [hash] => 0525f50fa7bcce868a48b7b28b9d2bf8785602191bc4180348d961bec9e93a36
        [uID] => 1650479263
        [saleID] => a90ab93a7c103a37554ce0d4617ce5a2
        [amount] => 100.00
    )
    //for approved investment
$VerifyHash = hash("sha256", 'API_KEY_VALUE' . "|" . 'uID_VALUE' . "|true");
if($VerifyHash == $_POST['hash']) {
	$payment_status = true;
} else {
	$payment_status = false;
}


   //for declined investment
$VerifyHash = hash("sha256", 'API_KEY_VALUE' . "|" . 'uID_VALUE' . "|false");
if($VerifyHash == $_POST['hash']) {
	$payment_status = true;
} else {
	$payment_status = false;
}

Key Required Description
method yes Must be set to withdrawCreate
apiKey yes Apikey defined to your dashboard
uID yes Unique transaction ID
amount yes Amount of claim
name yes Bank account holder
iban yes Bank account IBAN
callbackUrl yes Callback Url
function httpPost($url,$params) {
    $postData = '';
    foreach($params as $k => $v) {
        $postData .= $k . '='.$v.'&';
    }
    rtrim($postData, '&');

    $ch = curl_init();
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    curl_setopt($ch,CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);

    $output=curl_exec($ch);

    curl_close($ch);
    return $output;
}

$data = array(
    'method' => 'withdrawCreate',
    'apiKey' => 'd6a67356bbaf431b2f8c09198e5bbd82',
    'uID' => time(),
    'amount' => 200,
    'name' => 'Demo Withdraw',
    'iban' => 'TR11111111111111',
    'callbackUrl' => 'site.com'
);
$response = httpPost('https://cuzdanpay.com//api', $data);


//callback detail

    if code 200: approved
    if code 400: declined
Key Required Description
method yes Must be set to withdrawCreate
apiKey yes Apikey defined to your dashboard
uID yes Unique transaction ID
function httpPost($url,$params) {
    $postData = '';
    foreach($params as $k => $v) {
        $postData .= $k . '='.$v.'&';
    }
    rtrim($postData, '&');

    $ch = curl_init();
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    curl_setopt($ch,CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);

    $output=curl_exec($ch);

    curl_close($ch);
    return $output;
}

$data = array(
    'method' => 'withdrawResult',
    'apiKey' => 'd7e95a86db9e20e62e0595b0785dd4fe',
    'uID' => 'newSoftPay1650556419784848571'
);
$response = httpPost('https://cuzdanpay.com//api', $data);
    //response
code 400: Investment demand expected
code 401: Awaiting approval!
code 402: Investment declined.
code 200: Investment approved.

CARD PAYMENT

Key Required Description
method yes Must be set to ccCreate
apiKey yes Apikey defined to your dashboard
uID yes Unique transaction ID
callbackUrl yes Callback Url
successRedirectUrl yes User redirect Url for success transaction
failRedirectUrl yes User redirect Url for fail transaction
cardDetail yes Required for using the Whitelabel API
function httpPost($url,$params) {
    $postData = '';
    foreach($params as $k => $v) {
        $postData .= $k . '='.$v.'&';
    }
    rtrim($postData, '&');

    $ch = curl_init();
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    curl_setopt($ch,CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);

    $output=curl_exec($ch);

    curl_close($ch);
    return $output;
}

$cardDetail = array (
  'cc_holder' => 'Emre Akın',
  'cc_number' => '5356014312341234',
  'cc_month' => '03',
  'cc_year' => '2027',
  'cvv' => '844',
  'amount' => 100.2,
);

$data = array(
 'method' => 'ccCreate',
 'apiKey' => 'd6a67356bbaf431b2f8c09198e5bbd82',
 'callbackUrl' => 'https://site.com/paymentResponse',
 'successRedirectUrl' => 'https://site.com/userRedirect',
 'failRedirectUrl' => 'https://site.com/userRedirect',
 'uID' => time(),
 'cardDetail' => $cardDetail;
);
$response = httpPost('https://cuzdanpay.com//api', $data);
Key Description
status Investment result (true/false)
code Payment result code
hash Secure result validation code to prevent manipulation
uID The unique uID sent in the first request
saleID Receipt ID
amount Payment amount
Array (
        [status] => 1
        [code] => 200
        [message] => Payment accepted.
        [hash] => 0525f50fa7bcce868a48b7b28b9d2bf8785602191bc4180348d961bec9e93a36
        [uID] => 1650479263
        [saleID] => a90ab93a7c103a37554ce0d4617ce5a2
        [amount] => 100.00
    )
    //for approved payments
$VerifyHash = hash("sha256", 'API_KEY_VALUE' . "|" . 'uID_VALUE' . "|true");
if($VerifyHash == $_POST['hash']) {
	$payment_status = true;
} else {
	$payment_status = false;
}


   //for declined payments
$VerifyHash = hash("sha256", 'API_KEY_VALUE' . "|" . 'uID_VALUE' . "|false");
if($VerifyHash == $_POST['hash']) {
	$payment_status = true;
} else {
	$payment_status = false;
}

Key Required Description
method yes Must be set to ccResult
apiKey yes Apikey defined to your dashboard
uID yes Unique transaction ID
function httpPost($url,$params) {
    $postData = '';
    foreach($params as $k => $v) {
        $postData .= $k . '='.$v.'&';
    }
    rtrim($postData, '&');

    $ch = curl_init();
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    curl_setopt($ch,CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);

    $output=curl_exec($ch);

    curl_close($ch);
    return $output;
}

$data = array(
    'method' => 'ccResult',
    'apiKey' => 'd7e95a86db9e20e62e0595b0785dd4fe',
    'uID' => 'newSoftPay1650556419784848571'
);
$response = httpPost('https://cuzdanpay.com//api', $data);

    //response
code 400: Pending payment
code 401: User on 3D!
code 402: Payment declined.
code 200: Payment approved.