<p>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 <a href="https://blog.blockchain.com/2017/01/04/intro-to-bitcoin-development/" rel="nofollow noreferrer">QR code</a>. People have tried to generate a thousand addresses on their wallet and then cycle through them using JavaScript (<a href="https://jsfiddle.net/aztL2tjd/" rel="nofollow noreferrer">like this</a>), but it's hopelessly insecure and allows for users to possibly pay to the same address. </p>

<p>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 <a href="https://www.npmjs.com/package/bitcore-lib" rel="nofollow noreferrer">bitcore</a>, but this is usually too much for the average user. </p>

<p>If you're looking for something much easier I suggest <a href="https://gear.mycelium.com/" rel="nofollow noreferrer">Mycelium Gear</a>. 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. </p>

<p>Also if you're a wordpress developer I have heard good things about <a href="https://www.cryptowoo.com/" rel="nofollow noreferrer">Cryptowoo</a> in conjunction with Woocommerce. I have not tried it myself though. </p>

CC BY-SA 3.0
2017-02-07T06:53:41.863Z
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
CC BY-SA 3.0
2017-02-07T02:16:45.153Z
2017-02-07T02:16:45.153Z
m1xolyd1an
<p>One way is is to generate a QR code on your page. The QR would represent/encode your address. Or you could use Coinbase: <a href="https://www.coinbase.com/merchants?locale=en" rel="nofollow noreferrer">https://www.coinbase.com/merchants?locale=en</a></p>

CC BY-SA 3.0
2017-02-07T06:54:52.450Z
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
CC BY-SA 3.0
2017-02-06T22:36:53.057Z
2017-02-06T22:36:53.057Z
Zepplock
<p>I used search engine "accept bitcoin payments" and:</p>

<ul>
<li><a href="https://bitpay.com/" rel="nofollow noreferrer">https://bitpay.com/</a> - top result in my google charges 1% fee and requires some verification</li>
<li>Stripe charges 0.8% - <a href="https://stripe.com/bitcoin" rel="nofollow noreferrer">https://stripe.com/bitcoin</a> - capped at $5</li>
</ul>

<p>I'm actually looking for some home-grown solution as described here - <a href="https://bitcoin.stackexchange.com/questions/18782/how-to-accept-btc-payments">How to accept BTC payments</a> - but I cannot find anything...</p>

<p>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?</p>

<payment><websites><payment-processors><website-integration><javascript>
What are the best JavaScript libraries to accept Bitcoin payments?
Mars Robertson
# What are the best JavaScript libraries to accept Bitcoin payments?

(Asked by: username_0 on 2017-02-06)

I used search engine "accept bitcoin payments" and:

* <https://bitpay.com/> - top result in my google charges 1% fee and requires some verification
* Stripe charges 0.8% - <https://stripe.com/bitcoin> - capped at $5

I'm actually looking for some home-grown solution as described here - [How to accept BTC payments](https://bitcoin.stackexchange.com/questions/18782/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?

**Tags:** payment, websites, payment-processors, website-integration, javascript


---

## 2 answers

### Answer by username_1 on 2017-02-07. Score: 1

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](https://blog.blockchain.com/2017/01/04/intro-to-bitcoin-development/). People have tried to generate a thousand addresses on their wallet and then cycle through them using JavaScript ([like this](https://jsfiddle.net/aztL2tjd/)), 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](https://www.npmjs.com/package/bitcore-lib), but this is usually too much for the average user.

If you're looking for something much easier I suggest [Mycelium Gear](https://gear.mycelium.com/). 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](https://www.cryptowoo.com/) in conjunction with Woocommerce. I have not tried it myself though.

> **Comments:**
> **username_0**: 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?  

---

### Answer by username_2 on 2017-02-06. Score: 0

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>

> **Comments:**
> **username_0**: 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.  

---

