Receive Naira Debit Card [Mastercard, Visa, Verve] Payment
~/apireceive-ngn

GET METHOD

Nonce = time();
Hash = md5(Email.":".Amount.":".Order.":".Nonce);

URL = "https://endopay.com/apireceive-ngn/OrderID&Amount&Memo&Email&FailedURL&SuccessURL&Hash&Nonce";

POST METHOD

Nonce = time();
Hash = md5(Email.":".Amount.":".Order.":".Nonce);
    
<form action="https://endopay.com/apireceive-ngn" method="POST">

<input type="hidden" name="OrderID" value="1234567ABC"/>
<input type="hidden" name="Amount" value="14999.99"/>
<input type="hidden" name="Email" value="example@example.com"/>
<input type="hidden" name="Memo" value="Payment For Service"/>
<input type="hidden" name="SuccessURL" value="https://example.com/success.html"/>
<input type="hidden" name="FailedURL" value="https://example.com/fail.html"/>
<input type="hidden" name="Hash" value="cfc7f40ffdaca9fcac8d72df55ff5b54"/>
<input type="hidden" name="Nonce" value="123456789"/>
<input type="submit" value="SUBMIT"/>
    
</form>
 
Verify Debit Card Payment
~/apiverify-ngn

<?php

/* TRANSACTION CALLBACK REQUEST SCRIPT */

// PARAMETERS 
$APIkey = "MY_API_KEY"; // [REQUIRED] API Key
$OrderID = ""; // [REQUIRED] Transaction Order ID
$Amount = ""; // [REQUIRED] Transaction Amount

$apiurl = "https://endopay.com/apiverify-ngn/".$APIkey."&".$OrderID."&".$Amount; 
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $apiurl);
$o = trim(curl_exec($ch));
curl_close($ch);

$output = json_decode($o);
$error = $output->Error[0];

$success = $output->Success;
$successlines = count($success);

if($successlines == 1){
  $ar = array();
  $name["Status"] = $success[0]; // Successful, Failed, Cancelled are the options
  $name["Date"] = $success[1];
  $name["Reference"] = $success[2];
    if($success[0] == 'Successful'){
      $name["AmountReceived"] = $success[3];
      $name["AmountSettled"] = $success[4];
      $name["TransactionFees"] = $success[5];
    }else{
      $name["Comment"] = $success[3];
    }
    array_push($ar, $name);
}

print "<pre>";
print_r($ar);
print "</pre>";

?>

Make Withdrawal from Endopay Account [Naira] to Endopay Bitcoin Wallet Address
~/apiwithdraw-ngn

<?php

/* THIS SCRIPT WILL WITHDRAW FROM YOUR ENDOPAY ACCOUNT[NAIRA] TO ENDOPAY BITCOIN WALLET ADDRESS */

// PARAMETERS
$apikey ="MY_API_KEY"; // [REQUIRED] API Key
$amount = ""; // [REQUIRED] Amount to withdraw in naira(₦)
$confirmcode = "MY_CONFIRMATION_CODE"; // [REQUIRED] Confirmation code
$hash = md5($amount.':'.$apikey.':'.$confirmcode); // [REQUIRED]


$data = array("apikey"=>$apikey, "amount"=>$amount, "hash"=>$hash);
$string = http_build_query($data);

$apiurl = "https://endopay.com/apiwithdraw-ngn";
$ch = curl_init($apiurl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                        
    "Content-Type: application/x-www-form-urlencoded")                                                                      
);
$o = trim(curl_exec($ch));
curl_close($ch);

$output = json_decode($o);
$error = $output->Error[0];

/* success have either outputs [successful || pending]; */
$success = $output->Success[0]; 
// successful - when withdrawal is settled;
// pending - when withdrawal is unsettled;

print "<pre>";
print_r($output);
print "</pre>";

?>

Generate Bitcoin Address
~/apiaddress-btc

<?php

/* GENERATE NEW BITCOIN ADDRESS */

// PARAMETERS
$apikey = "MY_API_KEY"; // [REQUIRED] API Key
$label = ""; // [REQUIRED] Unique label new address
$confirmcode = "MY_CONFIRMATION_CODE"; // [REQUIRED] Confirmation code
$hash = md5($label.':'.$apikey.':'.$confirmcode); // [REQUIRED]

$data = array("apikey"=>$apikey, "label"=>$label, "hash"=>$hash);
$string = http_build_query($data);

$apiurl = "https://endopay.com/apiaddress-btc";
$ch = curl_init($apiurl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                        
    "Content-Type: application/x-www-form-urlencoded")                                                                      
);
$o = trim(curl_exec($ch));
curl_close($ch);

$output = json_decode($o);
$error = $output->Error[0];
$newaddress = $output->Success[0]; 
$newaddresslabel = $output->Success[1]; 

print "<pre>";
print_r($output);
print "</pre>";

?>
 
Bitcoin Recommended Fees
~/apifee-btc

<?php

/* BITCOIN NETWORK RECOMMENDED FEES */

// PARAMETERS
$apikey = "MY_API_KEY"; // [REQUIRED] API Key
$sendto = "";  // [REQUIRED] Corresponding address[Bitcoin] separated by comma when more than one
$amount = ""; // [REQUIRED] Corresponding amount[Satoshi] separated by comma when more than one 
$confirmcode = "MY_CONFIRMATION_CODE"; // [REQUIRED] Confirmation code
$sendfrom = ""; // [OPTIONAL] Single address to send from 
$hash = md5($sendto.':'.$amount.':'.$apikey.':'.$confirmcode); // [REQUIRED]

$data = array("apikey"=>$apikey, "amount"=>$amount, "from"=>$sendfrom, "to"=>$sendto, "hash"=>$hash);
$string = http_build_query($data);

$apiurl = "https://endopay.com/apifee-btc";
$ch = curl_init($apiurl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                        
    "Content-Type: application/x-www-form-urlencoded")                                                                      
);
$o = trim(curl_exec($ch));
curl_close($ch);

$output = json_decode($o);
$error = $output->Error[0];
$recommendedfee = $output->Success[0]; // in Satoshi
$estimatedsize = $output->Success[1]; // in Satoshi/Byte

print "<pre>";
print_r($output);
print "</pre>";

?>
 
Send Bitcoin
~/apisend-btc

<?php

/* SEND BITCOIN TO ANOTHER BITCOIN ADDRESS */

// PARAMETERS
$apikey = "MY_API_KEY"; // [REQUIRED] API Key
$sendto = "";  // [REQUIRED] Corresponding address separated by comma when more than one
$sendfrom = ""; // [OPTIONAL] Single address or leave empty
$amount = ""; // [REQUIRED] Corresponding amount separated by comma when more than one 
$fee = ""; // [OPTIONAL] In satoshi... leave empty to use recommended fees
$confirmcode = "MY_CONFIRMATION_CODE"; // [REQUIRED] confirmation code
$hash = md5($sendfrom.':'.$sendto.':'.$amount.':'.$apikey.':'.$confirmcode); // [REQUIRED]

$data = array("apikey"=>$apikey, "amount"=>$amount, "to"=>$sendto, "fee"=>$fee, "from"=>$sendfrom, "hash"=>$hash);
$string = http_build_query($data);

$apiurl = "https://endopay.com/apisend-btc";
$ch = curl_init($apiurl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                        
    "Content-Type: application/x-www-form-urlencoded")                                                                      
);
$o = trim(curl_exec($ch));
curl_close($ch);

$output = json_decode($o);
$error = $output->Error[0];
$txid = $output->Success[0]; // Blockchain transaction reference on successful broadcast

print "<pre>";
print_r($output);
print "</pre>";

?>
 
Fetch Bitcoin Address List
~/apiaddresslist-btc

<?php

/* FETCH ADDRESS */

// PARAMETERS
$apikey = "MY_API_KEY"; // [REQUIRED] API Key
$confirmcode = "MY_CONFIRMATION_CODE"; // [REQUIRED] Confirmation code
$hash = md5($apikey.':'.$confirmcode); // [REQUIRED]

$data = array("apikey"=>$apikey, "hash"=>$hash);
$string = http_build_query($data);

$apiurl = "https://endopay.com/apiaddresslist-btc";
$ch = curl_init($apiurl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                        
    "Content-Type: application/x-www-form-urlencoded")                                                                      
);
$o = trim(curl_exec($ch));
curl_close($ch);

$output = json_decode($o);
$error = $output->Error[0];

$success = $output->Success;
$lines = count($success);

if($lines > 0){
$ar = array();
    for($i=0; $i<$lines; $i++){
        $item = $success[$i];
        $n = count($item);
        for($j=0; $j<$n; $j++){
          $name["Address"] = $item[0];
          $name["Label"] = $item[1];
          $name["Balance"] = $item[2];
        }
        array_push($ar, $name);
    }
}

print "<pre>";
print_r($ar);
print "</pre>";

?>
 
Archive Bitcoin Address
~/apiarchiveaddress-btc

<?php

/* ARCHIVE BITCOIN ADDRESS */

// PARAMETERS
$apikey = "MY_API_KEY"; // [REQUIRED] API Key
$confirmcode = "MY_CONFIRMATION_CODE"; // [REQUIRED] Confirmation code
$address = ""; // [REQUIRED] Separate by comma when more than one
$hash = md5($address.':'.$apikey.':'.$confirmcode); // [REQUIRED]

$data = array("apikey"=>$apikey, "hash"=>$hash, "address"=>$address);
$string = http_build_query($data);

$apiurl = "https://endopay.com/apiarchiveaddress-btc";
$ch = curl_init($apiurl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                        
    "Content-Type: application/x-www-form-urlencoded")                                                                      
);
$o = trim(curl_exec($ch));
curl_close($ch);

$output = json_decode($o);
$error = $output->Error[0];
$success = $output->Success[0]; // success

print "<pre>";
print_r($output);
print "</pre>";

?>
 
Unarchive Bitcoin Address
~/apiunarchiveaddress-btc

<?php

/* UNARCHIVE BITCOIN ADDRESS */

// PARAMETERS
$apikey = "MY_API_KEY"; // [REQUIRED] API Key
$confirmcode = "MY_CONFIRMATION_CODE"; // [REQUIRED] Confirmation code
$address = ""; // [REQUIRED] Separate by comma when more than one
$hash = md5($address.':'.$apikey.':'.$confirmcode); // [REQUIRED]

$data = array("apikey"=>$apikey, "hash"=>$hash, "address"=>$address);
$string = http_build_query($data);

$apiurl = "https://endopay.com/apiunarchiveaddress-btc";
$ch = curl_init($apiurl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                        
    "Content-Type: application/x-www-form-urlencoded")                                                                      
);
$o = trim(curl_exec($ch));
curl_close($ch);

$output = json_decode($o);
$error = $output->Error[0];
$success = $output->Success[0]; // success

print "<pre>";
print_r($output);
print "</pre>";

?>
 
Contact | email: support@endopay.com | BBM: 7BC04E3E | YM: endopay

endopay.com © 2014 - 2018.