PHP Library script

Here you can find the Paytoshi PHP library to interact with the APIs.

Download PHP Library


  • PHP >= 5.3
  • PHP cURL extension (recommended)
  • allow_fopen_url enabled (if not using cURL)


These APIs are intended for advanced users that plan to directly interact with Paytoshi.

Want to start a new faucet instead? Download our Faucet Script.


Do you use PHP and want to interact with our APIs? Download the PHP Library linked on this page.

It's REALLY simply to use. Example:

require 'Paytoshi.php';
$paytoshi = new Paytoshi();
// Create a new payout
$result = $paytoshi->faucetSend(
    'a8p9uevhfgx7ewt1kf09v2n3kfhzkeyxi8ywcehfqnl9is30gq', //Faucet Api key
    '1EhNaUFaVW99in6drLeD8ygrLicAcf8rAc', //Bitcoin address
    100, //Amount
    '' //Recipient ip
// Create a referral payout
$result = $paytoshi->faucetSend(
    'a8p9uevhfgx7ewt1kf09v2n3kfhzkeyxi8ywcehfqnl9is30gq',  //Faucet Api key
    '1EhNaUFaVW99in6drLeD8ygrLicAcf8rAc',  //Bitcoin address
    100, //Amount
    '', //Recipient ip
    true //Referral flag

API v1 - Documentation

Create Faucet Payout

To call this APIs you need to obtain a faucet API key. Log in with your account and get one from the faucet section of your dashboard.





Query parameters
  • apikey: your faucet API key (e.g. a8p9uevhfgx7ewt1kf09v2n3kfhzkeyxi8ywcehfqnl9is30gq)
Body parameters
  • amount: payout amount in satoshi (e.g. 200)
  • address: bitcoin address (e.g. 1EhNaUFaVW99in6drLeD8ygrLicAcf8rAc)
  • ip: the IP address of the client requesting the payout (used to detect abuses)
  • referral: mark a payment as direct or referral (values: 0 or 1) [optional]

Payout in JSON format. Example:

    "recipient": "1EhNaUFaVW99in6drLeD8ygrLicAcf8rAc",
    "amount": 100

Error example:

    "error": true,
    "code": "INVALID_ADDRESS",
    "message": "Invalid Bitcoind address"