# Accept Bitcoin on your Drupal Commerce Store using BTCPay Server

Introducing BTCPay Server payment module for Drupal Commerce 2.x (opens new window). Drupal Commerce Store owners can now accept payments using Bitcoin and other cryptocurrencies directly through BTCPay Server without any third-party intermediary.

BTCPay Server supports a wide range of cryptocurrencies, with the potential for future extensions. Here are the currencies you can use now on BTCPay Server:

  • BTC (Bitcoin)
  • Bitcoin layer-two network (the Lightning Network) for fast and zero/low-fee transactions
  • Altcoins with full node integration including coins like Monero (XMR) and Litecoin (LTC).
  • Other Major Altcoins: Supported through plugins via platforms such as Trocador, SideShift, and FixedFloat.

Want to accept Bitcoin on your Drupal Commerce store? Visit the project page on Drupal.org (opens new window)

# Demo store

A Drupal Commerce demo store connected with a (testnet) BTCPay Server where you can try the checkout (Bitcoin + Lightning Network) can be found here:
http://drupal.demo.btcpay.tech (opens new window)

# Requirements

# Installation and configuration Guide for the BTCPay Server - Drupal Commerce Integration

Ready to accept Bitcoin on your Drupal Commerce Store? Follow this quick and easy guide to install and configure the BTCPay Drupal Commerce module. For a quick run through, check out our installation and configuration screencast:

# Easy setup steps

# Generate pairing code on BTCPay server

  1. Setup your store: You'd need a BTCPay server instance to get started. Don't have one? click here for a step by step guide.
  2. Access Tokens: Once you have your BTCPay Server instance setup and store created, navigate to the store settings and select "Access Tokens"
  3. Create a new token by clicking on [Create a new token]
  4. Label: enter some label (eg. my store)
  5. Public key: this needs to be left empty
  6. Facade: Type in "merchant"
  7. Click on [Request pairing]
  8. On the next screen choose your configured store in ** Pair to** select dropdown and click on [approve]
  9. Note down the displayed 7-digit code at the top status message, e.g. "d7afaXr"
    (you will need that code below on gateway configuration, see below)

# Commerce BTCPay: Installation + configuration

  1. Install module: composer require drupal/commerce_btcpay
  2. Enable the module: drush en commerce_btcpay -y
  3. Make sure you have configured private file system (opens new window) (needed to store encrypted public+private key)
  4. Commerce BTCPay configuration (Commerce -> Configuration -> Payment -> Payment gateways):
  5. Add payment method "BTCPay"
    • Mode: Test or Live (you can configure both individually)
    • Test/Live server host: enter your URL without https:// prefix e.g. btcpay.yourserver.com (Note - valid SSL certificate needed)
    • Test/Live Paring code: enter the 7-digit pairing code from BTCPay "Access tokens" page
    • Click Save to finalize the setup.
      You should see a message that the tokens were successfully created.

# Status

This module is currently in alpha stage but has proven stable without issues.
Future updates and releases will be available on the project page on drupal.org (opens new window)

# About BTCPay Server

BTCPay Server (opens new window) is a self-hosted, open-source cryptocurrency payment processor know for its security, privacy, and censorship resistance.

It's free to use and allows you to become your own payment processor. To get a full overview check out our documentationhttps://github.com/btcpayserver/commerce_btcpay/blob/master/.

# Compatible with BitPay API

BTCPay was created to be an alternative to 3rd party payment provider BitPay (opens new window). Therefore, BTCPay is invoice API compatible and you can use this payment plugin also with the official BitPay API and sites. The power of BTCPay is that you can become your own payment provider.

Teaser: future versions of this plugin will be based on the BTCPay Server Greenfield API which is much more powerful and allows more features.

# Get Support

You can open an issue on our Github repository (opens new window) or reach us on Telegram (opens new window) or Mattermost chat (opens new window)