We would like to expand our payment options and start offering Bitcoin payments for our products.

Given the price of Bitcoin is very volatile (it goes UP and DOWN a lot) - how would we determine how much the customer needs to send and how to set that up technically on Magento?

6 Answers 6


There are a couple of things you would need to consider/scope out.

  1. What API are you going to rely on for prices? (What backup api are you going to use if the first is not available)
  2. How often are you going to update the BTC to Currency?
    • Real time on page load? (possible performance issues)
    • Cron running every few minutes? (possibly losing out on BTC/money with old data)

Once you've figured that out it's a case of building a payment method module, there are a lot of good resources out there, below are a couple of good ones:

Personally i wouldn't go with the real time/page load as you are depending on the API's loading quickly for your pages to load quickly. I would use a cron and save the current BTC price in the database maybe every 10-15 minutes. Then you can retrieve that value of 1 BTC from the database and do the math against the quote total.

Wherever your bitcoin wallet is would need to have an API too that you could hook into to confirm the payment has been sent (unless this is going to be done manually) You would probably need to ask the use for confirmation on the address they are using to send.

With all that being said, there is a Magento extension (I've not tested or tried it) that is an add-on to the Stripe payment gateway that allows you to accept bitcoin as a payment: Cryozonic But you would need to check the code to make sure it's not doing some malicious or stealing the bitcoins.

The Bitpay option that @BBQ mentioned looks like a good option too.


Well, a lot of websites offer Bitcoin currency status API's. So that'll be the first go-to. You should consider requesting the realtime price of bitcoin everytime a customer wants to pay with it, or update the currency value once per interval. Once you got that handled, you can serve the customer with that price, and provide the payment method that handles bitcoin.

Theres no quick explanation on how to add a bitcoin payment method to your store, you really have to create it from the ground up, or simply try using a PSP (Payment service provider), such as Adyen, or Bitpay


There are magento modules available that take already take care of this and much more

  • Display amount of BTC to pay depending on current price, along with a timelimit
  • Generate new bitcoin address for each payment
  • Auto Update status of order when payment is received

Feel free to look at blockonomics module


Accepting Bitcoin on Magento stores is super easy. You don’t need any high-quality programming skills; many Magento modules allow you to integrate Bitcoin payment method in your store quickly within a few minutes. Of the many options, I have used CoinGate Bitcoin Magento extension which is very popular and widely used to accept Bitcoin on Magento stores.

I have also written a brief guide to accept Bitcoins on Magento stores, have a look at it:

How to Accept Bitcoins on Magento Stores


Magento will not allow you to add new currencies without modification. Bitcoin requires increased price accuracy - up to 8 decimals. You will need to update Bitcoin exchange rate much more often than once a day. There are some other limitations in standard Magento distribution. You can try live demo of this extension for Magento 2 https://shop.kozeta.lt/m2-any-currency.html that possibly will help you.


If you want to offer Bitcoin payments for your products in Magento, you will need to use a payment gateway that supports Bitcoin, such as BitPay or Coinbase. These payment gateways will handle the conversion of Bitcoin to your local currency and deposit the funds into your account.

When a customer selects Bitcoin as their payment method, the payment gateway will generate a unique Bitcoin address for the customer to send their payment to. The amount of Bitcoin the customer needs to send will be calculated based on the current exchange rate at the time of the transaction.

To set this up technically in Magento, you will need to integrate the chosen payment gateway's API into your store. This will involve configuring the payment method in Magento and setting up the API credentials provided by the payment gateway. Once the integration is complete, the Bitcoin payment option will be available for customers to select during checkout.

It's important to note that due to the volatility of Bitcoin prices, you may want to consider setting up a system to regularly update the exchange rate used for calculating Bitcoin payments. This can be done using a third-party service or plugin that provides live Bitcoin exchange rates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.