Post
Topic
Board Project Development
Re: How to accept bitcoin on a website ?
by
687_2
on 20/02/2015, 16:48:33 UTC
Is there any way to accept bitcoin on a website automatically without using a 3rd party like bitpay? 

Yes, it is fairly easy if you are comfortable with PHP.

Using blockchain.info's API:
https://blockchain.info/api/api_receive

This creates a new address for each invoice and forwards the payment to an address you specify. Everything else is just creating a listener for the payment (using blockchain/info's notifier)/updating your database, etc.

To create "fresh" addresses otherwise, you'll probably want to use a Python script that has a wallet's MPK and then keep the rest stored offline. I have an academic example done in PHP where you query a database of pre-generated addresses (not recommended):
https://github.com/jswebdevel/btcbox