What are the best JavaScript libraries to accept Bitcoin payments?


I used search engine "accept bitcoin payments" and:

I'm actually looking for some home-grown solution as described here - How to accept BTC payments - but I cannot find anything...

And I don't want to apply "false economy" - Stripe checkout process is sleek, they must have optimised it a lot... But yeah, still looking for a drop-in library for accepting BTC payments?

Mars Robertson

Posted 2017-02-06T22:02:34.670

Reputation: 309



A JavaScript library? JavaScript is client-side and accepting bitcoin payments is basically like creating a shopping cart system from scratch. So you're not going to get far with JavaScript alone unless you just want to accept donations by tossing up a QR code. People have tried to generate a thousand addresses on their wallet and then cycle through them using JavaScript (like this), but it's hopelessly insecure and allows for users to possibly pay to the same address.

To create a shopping cart you'll need to use a server-side language like PHP, NodeJS, Python, Perl, etc. The easiest way is using a 3rd party API or you can do everything from scratch with a library. My personal fav is nodejs and bitcore, but this is usually too much for the average user.

If you're looking for something much easier I suggest Mycelium Gear. They basically allow you to fill out a form with your product info and they'll give you a link to post on your site.

Also if you're a wordpress developer I have heard good things about Cryptowoo in conjunction with Woocommerce. I have not tried it myself though.


Posted 2017-02-06T22:02:34.670

Reputation: 4 083

Javascript can be used on the backend too - node.js It cannot be that hard to generate BTC address (or reuse the old one) and monitor Blockchain transactions to see money coming in... Or maybe it is that hard to do it secure? – Mars Robertson – 2017-02-07T06:53:41.863


One way is is to generate a QR code on your page. The QR would represent/encode your address. Or you could use Coinbase: https://www.coinbase.com/merchants?locale=en


Posted 2017-02-06T22:02:34.670

Reputation: 99

I should add that I'm based in UK / EU and I'm not sure if... https://www.coinbase.com/global - OK, will give it a shot.

– Mars Robertson – 2017-02-07T06:54:52.450