Payment Widget Updates— More Flexible and Powerful

Last year we introduced bitcoin payment widgets as a way to embed payment flow into existing webpages without the need of annoying button…

Last year we introduced bitcoin payment widgets as a way to embed payment flow into existing webpages without the need of annoying button like popups. We have received good feedback from merchants and have upgraded the structure to make it more lean and adaptive so that it easily levered to create beautiful bitcoin payment experience

Using session customer data

This is the most requested feature from merchants. Most websites already have logged in customer data. Asking customer data again in payment button field is redundant and provides a slow experience. Using payment widget you can easily use customer data like email, address, loginid that you already have in your session

<button id="pay">Pay with Bitcoin</button><div id="payment_area"></div><script src="https://blockonomics.co/js/pay_widget.js"></script><script>  function pay() {    Blockonomics.widget({      msg_area: 'payment_area',      uid: 'e4e70ddd65494fa6',      email: 'johnberry@gmail.com'    });  }  document.getElementById('pay').onclick = function() { pay() };</script>
Payment Widgets expand inline and are modular UI components

For live example please see here

Event Callback

Another feature usually requested is to know when customer has paid. This can be used to achieve various things in javascript:

  • Redirect customer to special thank you page
  • Give custom order confirmation message
  • Upsell other products

This is now available via JS callback function window.blockonomicsPaymentCallback which is run as soon as the Payment Widget has received an unconfirmed bitcoin payment. We will be adding more events soon as widgets get used more and we discover more usecases.

Don’t use this callback to directly deliver your product as javascript is easily accessible to customer. Your product/secret keys/access codes must be delivered only after after bitcoin confirmed payment which will mark the order as paid. You can receive callbacks to your server via order hook url

Payment Widget Demos

Javascript API Documentation


Payment Widgets are a flexible way to accept bitcoin payment seamlessly on your existing webshop. We have made improvements to our API so that it is modular to be easily used in various use cases. Feel free to get back to us for suggestions for improvements via our helpdesk