I'm new to Bitcoin. I want to use PHP to create a bitcoin wallet on my own website. I came to here https://blockchain.info/api/create_wallet but I don't know how to apply it.

Would like to have good tutorials from some websites or videos.

3 Answers 3


I would highly discourage writing your own PHP Wallet App, in which without proper security, your wallet and your clients wallets might be compromised in the future.

But if you insist on creating an online wallet, I would highly recommend Blockchain's Online Wallet. You can access the source code here

The application is written in Javascript, which enables a second layer of security (all operations are done on the user's browser). I think you can use this through your PHP application, in which nearly all web apps use Javascript libraries.



  • Great... but can you tell me how to implement this? And where is the HTML or PHP code in source code? Commented Jul 14, 2017 at 13:31

You can find your answer here

Snippet of code

Example from bitcointalk

  #Below is full list of available characters.
  $fp=fopen("/dev/urandom","r") or die;
    $check=hash('sha256',$minikey . '?') . "\n";
  print "Minikey: $minikey\n";
  print "Privkey: $priv\n";

You can find some useful information here


. You can use Bitcoin-PHP Payment library - https://github.com/cryptoapi/Payment-Gateway

        require_once( "cryptobox.class.php" );

        $options = array( 
        "private_key" => "",        // private key from gourl.io
        "orderID"     => "your_product1_or_signuppage1_etc",
        "amountUSD"   => 2          // 2 USD

        // Initialise Payment Class
        $box1 = new Cryptobox ($options);

        // Display Payment Box or successful payment result   
        $paymentbox = $box1->display_cryptobox();

        // A. Process Received Payment
        if ($box1->is_paid()) 

            // Your code here to handle a successful cryptocoin payment
            // ...
        else $message .= "The payment has not been made yet";
    <!DOCTYPE html>
    <?= $paymentbox ?>
    <?= $message ?>

Not the answer you're looking for? Browse other questions tagged or ask your own question.