This is how BlockJS library works!

1) Download and include BlockJS library in your project

<script src="block-js.js">

2) Add BlockJS element where you want to render the button, include the data-amount parameter

<div id="blockJS" data-amount="3.50">

3) Get your Private Key on BlockPOS and set it

BlockJS.setPk('YOUR_PK_HERE')

4) Handle response with javascript and do whatever you want!

BlockJS.onPaymentReceipt( (success) => { alert(success) })


BlockJS.onPaymentFailure( (error) => { console.log(error) })

Test it now!

Every BTC sent here will be intended as a donation to the project!