Withdraw cryptocurrencies from your account to the blockchain network. IPN URL can be set up to be notified about the withdrawal request status.

Endpoint

https://anonwallet.net/api/v1/create_withdrawal

POST Body Parameters

ParametertypeExampleIs Required?
amountdouble0.001Yes
currencystringBTCNo (default is BTC)
addressstring1BthisisandummybitcoinaddressYes
ipn_urlstringhttps://domain.com/ipn_handlerNo (Used to notify you on incoming payments on callback address)

Your domain must have SSL Certificate

Code Example

/**
 * Requires libcurl
 */

$curl = curl_init();

$payload = array(
  "amount" => "0.001",
  "currency" => "BTC",
  "address" => "1Bthisisandummybitcoinaddress",
  "ipn_url" => "https://domain.com/ipn_handler",
);

curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
    "Authorization: Bearer YOUR_API_KEY_HERE"
  ],
  CURLOPT_POSTFIELDS => json_encode($payload),
  CURLOPT_URL => "https://anonwallet.net/api/v1/create_withdrawal",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$error = curl_error($curl);

curl_close($curl);

if ($error) {
  echo "cURL Error #:" . $error;
} else {
  echo $response;
}

API Response

{
    "status": 200,
    "message": "OK",
    "withdrawal_id": "urehruwh_askjdisajid_aksmdjmkasjdsa"
}