Send payments via api
Send Payments via your website/app instantly
Send Payments using our API
Use our API to send payments using your API key and API secret. This can be modified to your needs and is great for mass payments.
API_KEY, API_SECRET, and HASH can be found on your API settings page located at the dashboard.
1
include_once("sendbit.inc.php"); //libaray
2
3
define("API_KEY", "YOUR_API_KEY");
4
define("API_SECRET", "YOUR_API_SECRET");
5
$hash = "$2y$12$SeCkgzINScl2DWSzs2ofYO2604UO6U.kI3mCWfoGYuCpvvbpzp9HG"; //Do not change this hash, or else API becomes invalid.
6
7
$address = "1tkh8ENwHr8Uoo6PWFM31T5ub2cQiFGbm";
8
$amount = 0.00000000; // amount to send (amount in selected coin)
9
$fee = 0.000055; // total fee for your transaction (amount in selected coin)
10
11
$api_client = new SendBitApi(API_KEY, API_SECRET);
12
$api_client->setCoin("BTC"); // set coin (BTC, LTC, BCH, DASH) https://www.sendbit.io/page/coins_accepted
13
$api_client->setField("recipient", $address);
14
$api_client->setField("amount", $amount);
15
$api_client->setField("fee", $fee);
16
$api_client->setField("akhami_hash", $hash);
17
$api_client->setMethod("send-payment");
18
$response = $api_client->process();
19
20
if($response["response_code"] != 200) {
21
22
exit($response["response_message"]);
23
24
} else {
25
26
$transaction_id = $response["transaction_id"]; //Shows TXN
27
28
}
Copied!
Copy link