Cryptocurrency payment on your e-shop using Drupal… what?!

Many people interested in the modern IT world use, or at least own, a few cryptocurrencies. Their usage is still a bit limited, but people’s demand skyrockets. Cryptocurrencies have been on the rise over the past years, and sellers must follow the trend.
Should we go for it?
Adding a new feature to your e-shop — a cryptocurrency payment- can be something interesting for your customers. At least it will make it stand out from the crowd. Implementation depends on the system, but if you plan to build a new e-shop, our recommendation is Drupal.
Can Drupal help?
There are many use cases Drupal can handle. Drupal Commerce opens even more possibilities. Said, it’s an extension for your Drupal website that adds e-shop features so you don’t have to code them from scratch. It’s “open-source eCommerce software that augments content management system Drupal”. Installation is not as simple as adding a new module and enabling it so we won’t cover it in this article. If you use Drupal 8, check out probably the easiest way of installation on the official website: https://www.commercekickstart.com/
How does it look in Drupal?
Commerce tab appears in the main Drupal menu after successful installation.

Tab opens the Administration page of the module.

The most important section for us is Payment gateways in Configuration.

Choosing a payment gateway
Commerce supports both on-site and off-site payment gateways. A bunch of them are already available as modules and you don’t have to code them from scratch. At this time, there are 7 main and 73 more payment gateways, but only one called Commerce Coinpayments supports cryptocurrencies. If you want to use another blockchain payments provider, such as BitPay, you must follow the Commerce documentation and create your own custom module. It’s pretty well documented here.
Using a custom payment gateway
Modules (“plugins”) provide configuration forms that allow you to insert, for example, your API credentials provided by your blockchain payment provider. While adding a new payment gateway through Commerce configuration, you have to choose “plugin” — that’s either your custom module or the one you downloaded from the “Available payment gateways” section of Commerce documentation. The form will then transform according to that plugin.

When you save a new payment gateway, you will be redirected to the list of all available payment gateways.

These will be available for customers to choose in the checkout flow.

Subsequent steps depend on a blockchain payment provider. If the off-site option is chosen, the user will be redirected to the provider’s website during the last step of checkout. All payment operations will be handled there, and the user will be redirected back. If the on-site option is chosen, you will likely need to add an extra step to the checkout flow where the user enters payment information, as all payment operations will be handled without redirecting to your website.
Conclusion
Implementations of custom payment methods, even those using cryptocurrencies, are well-documented, and today, there are many blockchain payment providers available. We were able to add this feature to the client’s website without any complications, making it a unique experience for customers so they can spend their coins there.