API v2

Checking account balance
POST https://cryptobara.com/api/v2/wallet/state/ key

(string) key - API key (64 chars).
PHP code
$fields = [
'key'=>'689341a981a42dc60c461b119d934d5984d8a5e899c6fb5d56ef43c42fd7cdcf'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://cryptobara.com/api/v2/wallet/state/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $fields);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
Json responce
{"success":true,"currency":"btc","balance":28238187}
Send to address
POST https://cryptobara.com/api/v2/wallet/send/ key to amount notice

(string) key - API key (64 chars).
(string) to - the coin address you are sending to (max. 255 chars).
(integer) amount - Amount in a one hundred millionth of a single coin (1/100000000).
(string) notice - Description of an item or service (max. 255 chars).
PHP code
$fields = [
'key'=>'689341a981a42dc60c461b119d934d5984d8a5e899c6fb5d56ef43c42fd7cdcf',
'to'=>'1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa',
'amount'=>1000,
'notice'=>'💎Reward💎'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://cryptobara.com/api/v2/wallet/send/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $fields);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
Json responce
{"success":true,"trid":"pr27olkk"}
Request to create new invoice
POST https://cryptobara.com/api/v2/invoice/create/ key amount notice data url

Invoice lifetime: 30 minutes
Invoice url: https://cryptobara.com/invoice/open/{invid}/
You need to have an active wallet address for receiving payment (Press button "Create a New Address")
(string) key - API key (64 chars).
(integer) amount - Invoice amount in a one hundred millionth of a single coin (1/100000000).
(string) notice - Description of an item or service (max. 255 chars).
(string) data - Unalterable data, will return on request (max. 1000 chars).
(string) url - An URL to which users will be redirected after a successful payment (max. 255 chars).
PHP code
$fields = [
'key'=>'689341a981a42dc60c461b119d934d5984d8a5e899c6fb5d56ef43c42fd7cdcf',
'amount'=>1000,
'notice'=>'💎Deposit💎',
'data'=>'Text',
'url'=>'http://backurl.com/uniqueid/',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://cryptobara.com/api/v2/invoice/create/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $fields);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
Json responce
{"success":true,"invid":"1xmiqsf7"}
Information about invoice
POST https://cryptobara.com/api/v2/invoice/state/ key invid

(string) key - API key (64 chars).
(string) invid - Invoice id.
PHP code
$fields = [
'key'=>'689341a981a42dc60c461b119d934d5984d8a5e899c6fb5d56ef43c42fd7cdcf',
'invid'=>'1xmiqsf7'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://cryptobara.com/api/v2/invoice/state/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $fields);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
Json responce (unpaid invoice)
{"success":true,
 "invoice":{
    "amount":"1000",
    "notice":"\ud83d\udc8eDeposit\ud83d\udc8e",
    "data":"Text",
    "url":"http:\/\/backurl.com\/uniqueid\/",
    "time":"1515597555",
    "trid":""
}}
Json responce (paid invoice)
{"success":true,
 "invoice":{
    "amount":"1000",
    "trid":"PR27OMN9",
    "notice":"\ud83d\udc8eDeposit\ud83d\udc8e",
    "data":"Text",
    "url":"http:\/\/backurl.com\/uniqueid\/",
    "time":"1515597637"
}}
Error codes
{"success":false,"code":1000,"message":"Invalid API key."}

{"success":false,"code":1001,"message":"CryptoBara.com is in maintenance mode, try again in five minutes."}

{"success":false,"code":1002,"message":"API access disabled by owner."}

{"success":false,"code":1003,"message":"Invalid Ip."}

{"success":false,"code":1004,"message":"Invalid address."}

{"success":false,"code":1005,"message":"Invalid amount."}

{"success":false,"code":1006,"message":"Insufficient funds."}

{"success":false,"code":1007,"message":"Invalid InvId key."}