API documentation


Download a PHP faucet script

Microfaucet: a tiny Bitcoin faucet script written in PHP. Really easy to use.

Download the faucet script here


Request API key

Register and login first.

Easy to use PHP class for the API For building your own faucet

Download, unzip and check the example.php file.

Download the code

Example usage:
require_once 'Microwallet.php';

// Create the object with your API key
$microwallet = new Microwallet('YOUR_API_KEY_HERE');

// Sends 1000 satoshi to the Microwallet Donate Bitcoin address
$result = $microwallet->send('1MiCRoXT5gFtGZLSmW6efAx968WAKvD5xz', 1000);

// The html in the result is ready to print out
echo $result['html'];

The API For advanced users

Send payment

Send POST request to:

https://www.microwallet.org/api/v1/send

Required parameters:
Optional parameters:
Response:

JSON. The status in the JSON is 200 if it was successful.

Example responses:

{"status":403,"message":"Invalid API key."}

{"status":402,"message":"Insufficient funds."}

{"status":200,"balance":"97369","balance_bitcoin":"0.00097369"}

{"status":200}


Get balance

Always cache the result of this API call.

Send GET request to:

https://www.microwallet.org/api/v1/balance

Required parameters:
Response:

JSON. The status in the JSON is 200 if it was successful.

Example responses:

{"status":200,"balance":"500000","balance_bitcoin":"0.00500000"}

{"status":401,"message":"API key missing."}


Get Bitcoin address

Usernames will be discontinued. This API call returns the Bitcoin address of a user. The returned Bitcoin address is what the user set on the Settings page.

Send GET request to:

https://www.microwallet.org/api/v1/get-bitcoin-address

Required parameters:
Response:

JSON. The status in the JSON is 200 if it was successful.

Example responses:

{"status":200,"bitcoin_address":"1MiCRoXT5gFtGZLSmW6efAx968WAKvD5xz"}

{"status":404,"message":"Bitcoin address does not exists."}