BTCPay Server has evolved significantly since Nicolas Dorier’s initial decision to develop a software project aimed at replacing the payment processor BitPay in response to their actions during the 2017 Blocksize Wars. It has now become one of the most widely used self-hosted payment processing stacks for Bitcoin users.
Moreover, it is not only small eshop operators and merchants who are using it. Major companies like Namecheap (a domain registrar) and CheapAir (an airline booking company) have also made the transition to using self-hosted BTCPay instances instead of centralized payment processors.
The software stack is designed to facilitate easy integration into almost every major merchant stack, including WooCommerce, Shopify, WordPress, as well as their own Greenfield API for custom integration. Internally, it supports simple wallet management and seamless integration of on-chain hot wallet and cold wallet. While Lightning support requires the user to source their own receiving liquidity, the rest of the process to set up a node is well supported and straightforward. The suite even includes support for Payjoin and Wabisabi coinjoins. In essence, it offers comprehensive support for the various ways merchants may want to use Bitcoin.
However, that is no longer the case. Ant (known for TimechainStats) and TC (creator of Timechain Calendar) have both implemented the BTCPay Pay Button natively in React while integrating BTCPay into their React apps. During this process, they encountered challenges and had to make several choices regarding the frontend code provided by BTCPay to make it work in a React-friendly way. As a result, they developed a tool to make this process easier for others.
The React BTCPay Pay Button is a complete reimplementation of the standard Pay Button functionality specifically for React applications. It provides the Button as a single component that can be easily embedded into any React application. The component allows for full customization without the need to reconfigure or alter settings on the BTCPay Server side. Simply add the button, connect it to the server, and everything from that point on can be reconfigured or altered from the application side.
Ant shared his thoughts on this, saying:
“TC and I wanted to create a simple way for other React developers to seamlessly incorporate the awesome functionality of the BTCPay Pay Button into their React apps. This idea was inspired by our initial attempts to integrate BTCPay into our React projects Timechain Calendar and TimechainStats. Now, with just two props—Store ID and Domain—any React app can fully integrate the BTCPay Pay Button. This native implementation aims to bridge the gap for React developers, providing an easy-to-integrate solution that aligns with React’s principles.”
Prior to the release of the React BTCPay Server Pay Button, integrating BTCPay functionality into one of the largest web application frameworks required a complete custom implementation by the app developer. Now, it is as simple and straightforward as integrating the vanilla BTCPay Pay Button into HTML or PHP projects.
There has been talk that Nicolas Dorier plans to officially integrate this feature into the BTCPay suite itself. Although this project may seem small in the grand scheme of things, it will make integrating BTCPay into React projects much easier and less time-consuming for future developers compared to the efforts Ant and TC had to put in to develop it from scratch for their own projects. This exemplifies the open-source mindset and actions that have contributed to the growth of many of the tools and software stacks used in the Bitcoin ecosystem today.
To learn more about the React BTCPay Server Pay Button, visit the Github repository.