Metamask & Web3.js Ethereum Payment Extension for Magento 2 – Direct Crypto Payments Without Third-Party Gateways

·

E-commerce is evolving rapidly, and cryptocurrency payments are becoming a mainstream necessity. For merchants using Magento 2, integrating Ethereum (ETH) payments directly through MetaMask offers a decentralized, secure, and cost-efficient solution—without relying on third-party gateways. This guide explores a powerful open-source extension that enables direct wallet-to-wallet Ethereum transactions using web3.js, ensuring full control over payments and aligning with the true spirit of blockchain technology.

👉 Discover how easy it is to accept Ethereum payments on your store today.


Why Direct Ethereum Payments Matter

Traditional cryptocurrency payment gateways often act as intermediaries, holding funds temporarily and controlling transaction flow—this contradicts the core principle of decentralization. When you use crypto, the goal is peer-to-peer transactions: no middlemen, no extra fees beyond gas, and no risk of frozen assets.

The MetaMask Ethereum Payment Extension for Magento 2 eliminates third-party dependencies by allowing customers to pay directly from their MetaMask wallets to the merchant’s Ethereum address. This module uses web3.js and the Etherscan API to verify transactions securely, ensuring both buyer and seller retain full control.

This approach supports:


Key Features of the Extension

The extension is designed for reliability, usability, and real-world e-commerce needs. Here are its standout capabilities:

✅ Display Prices in Ether (ETH)

Show product prices directly in ETH alongside fiat currencies. Customers can instantly see how much they’re paying in cryptocurrency.

✅ Pay via MetaMask at Checkout

After placing an order, users can pay using their connected MetaMask wallet—no redirects or external forms.

✅ Pay Later from Customer Account

If a customer doesn’t complete payment during checkout, they can return to their account dashboard and pay later—improving conversion rates.

✅ Real-Time Transaction Verification

The system checks transaction status using:

✅ Manual Admin Verification

Administrators can manually verify or check any transaction from the backend, adding an extra layer of control.

✅ Multi-Network Support

Works on both mainnet and testnets (e.g., Ropsten, Goerli), making development and testing seamless.

👉 Start accepting Ethereum payments with full control over your transactions.


How It Works: The Payment Flow

  1. Customer selects ETH as currency → Only when ETH is selected will the payment method appear.
  2. Checkout process begins → After order placement, the customer is directed to the payment page.
  3. Wallet connection → The customer clicks "Connect Wallet" to authorize MetaMask.
  4. Payment initiation → Once connected, they click "Pay" and confirm the transaction in MetaMask.
  5. Transaction verification:

    • Frontend uses web3.js to listen for confirmation
    • If enabled, the system verifies the transaction via Etherscan API
    • Cron jobs periodically check unconfirmed transactions
  6. Order status updated → Upon successful blockchain confirmation, the order moves to "Processing" or "Complete."
🔒 Security Tip: Always enable Etherscan API verification to prevent front-end JavaScript injection attacks during payment processing.

Installation Guide

This module requires Composer and proper repository configuration.

Step 1: Add Required Repositories

Update your composer.json with the following repositories:

"repositories": {
  "crypto-base": {
    "type": "git",
    "url": "[email protected]:torys877/crypto-base.git"
  },
  "crypto-currency-precision": {
    "type": "git",
    "url": "[email protected]:torys877/crypto-currency-precision.git"
  },
  "crypto-metamask-eth-payment": {
    "type": "git",
    "url": "[email protected]:torys877/crypto-metamask-eth-payment.git"
  }
}

Alternatively, add them via command line:

composer config repositories.crypto-base git [email protected]:torys877/crypto-base.git
composer config repositories.crypto-currency-precision git [email protected]:torys877/crypto-currency-precision.git
composer config repositories.crypto-metamask-eth-payment git [email protected]:torys877/crypto-metamask-eth-payment.git

Step 2: Install the Module

Run:

composer require cryptom2/metamask-eth-payment:v1.0.0
php bin/magento setup:upgrade

Clear cache if needed:

php bin/magento cache:clean

Configuration Settings

Navigate to Stores > Configuration > Sales > Payment Methods to configure the module.

Live Settings

Test Mode

Use identical settings but with testnet values:

Display ETH Currency

To show ETH pricing:

  1. Add ETH to allowed currencies in Magento (Stores > Configuration > General > Currency Setup)
  2. Set a manual exchange rate or use a script to update it regularly (auto-update may come in future versions)

Frequently Asked Questions (FAQ)

Q: Can I use this without MetaMask?
A: No. The extension relies on MetaMask for wallet connectivity and signing transactions via web3.js.

Q: Is this secure against fraud or fake transactions?
A: Yes—by enabling Etherscan API verification, the system confirms actual blockchain confirmations, not just frontend claims.

Q: Can customers pay after placing an order?
A: Absolutely. Unpaid orders can be paid later from the customer’s account page.

Q: Does this work with other blockchains like BSC or Polygon?
A: Currently, it only supports Ethereum and its testnets. Future versions may expand compatibility.

Q: Are there recurring or subscription payments?
A: Not yet. This version supports one-time payments only.

Q: What happens if a transaction fails or gets stuck?
A: Admins can manually check status in the backend. Customers can retry payment from their account.


Screenshots & User Experience

💰 Price Display in ETH

Products show accurate ETH pricing based on current exchange rates.

🛒 Payment Method at Checkout

Appears only when ETH is selected—clean and intuitive.

🔗 Connect Wallet Button

First step in the flow—securely connects user’s MetaMask wallet.

⚡ Pay with MetaMask

After connection, user confirms payment directly in their wallet.

🕒 Processing Transaction

User waits on-page while Magento verifies blockchain confirmation via web3.js and/or Etherscan.

📊 Admin Transaction Check

Each transaction ID links directly to Etherscan for full transparency.

🧑‍💼 Pay from Customer Account

Flexible payment option improves completion rates for abandoned carts.


Final Thoughts

The MetaMask Ethereum Payment Extension for Magento 2 empowers merchants to embrace true decentralization. By cutting out intermediaries, you reduce costs, increase trust, and align with the original vision of cryptocurrency: direct, peer-to-peer value transfer.

Whether you're running a small online store or scaling a digital goods platform, this tool provides a robust foundation for accepting ETH with full transparency and control.

👉 Get started with decentralized payments—see how simple crypto integration can be.


Core Keywords: Ethereum payment Magento 2, MetaMask integration, web3.js cryptocurrency, direct crypto payments, Ethereum wallet payment, Magento 2 blockchain extension, decentralized e-commerce payments, Etherscan API verification