Accept crypto payments with Magento

Add a non-custodial crypto payment method to Magento 2 and Adobe Commerce with the NoncePay module. Customers pay orders in USDT, USDC, BTC, ETH, SOL and more, forwarded to your own wallets.

The NoncePay module for Magento 2 and Adobe Commerce adds a Pay with crypto payment method to the checkout. The customer pays on the NoncePay hosted payment page and the order is invoiced once the payment is confirmed. Every payment is forwarded to your own wallet, minus our fee. There is no account, no API key and no withdrawal step.

Install

With Composer, from the Magento root:

composer config repositories.noncepay vcs https://github.com/Nonce-pay/noncepay-magento
composer require noncepay/module-payment
bin/magento module:enable NoncePay_Payment
bin/magento setup:upgrade
bin/magento cache:flush

Or download noncepay-magento.zip from the latest release, unzip it into the Magento root (it adds app/code/NoncePay/Payment/) and run the same bin/magento commands. In production mode, also run setup:di:compile and setup:static-content:deploy.

Then go to Stores > Configuration > Sales > Payment Methods > NoncePay (crypto), enter a receiving wallet for each family of coins you accept, set Enabled to Yes and save.

Requires Magento Open Source or Adobe Commerce 2.4.6 or later and PHP 8.1 to 8.3. Your store must be reachable from the internet so NoncePay can call its callback. The source is on GitHub.

How it works

  1. The customer picks Pay with crypto and places the order, which is created in Pending Payment.
  2. The module creates a payment link for the order grand total in the order currency and redirects the customer to its page. A reload reuses the same link. If the link cannot be created, the order is cancelled and the cart restored.
  3. The customer picks a coin and pays. Each payment is forwarded to your wallet as soon as it confirms.
  4. Once the payments cover the order, NoncePay sends the link-paid callback. The module verifies its x-ca-signature against the key from /pubkey/, checks the link and the amount, then invoices the order with the link id as transaction id and moves it to Processing, so a repeated callback is captured once.
  5. The customer is sent back to the store, which shows the order confirmation once the order is invoiced and a "being confirmed" page until then. The order is only marked paid by the signed callback, never by this redirect.

Captures, over and underpayments are written to the order history. Problems are logged to var/log/noncepay.log.

Settings

SettingDefaultWhat it does
WalletsemptyOne per family: EVM, Tron, Bitcoin, Litecoin, Bitcoin Cash, Dogecoin, Solana; split syntax accepted
Coins offeredevery coin of your walletsOptional comma-separated tickers such as trc20/usdt,bep20/usdt,btc
Merchant name, logostore name, noneShown on the payment page; the logo must be an https URL
Underpayment tolerance0%0 to 1%: how much less than the order total still invoices it
Debug logoffLogs API calls and every callback to var/log/noncepay.log

Limits

  • The order currency must be one NoncePay prices (USD, EUR, GBP and about thirty others). For another currency the method is hidden at checkout.
  • Magento cancels orders left in Pending Payment after the Pending Payment Order Lifetime (480 minutes by default). The payment link expires an hour before that; keep the lifetime at two hours or more.
  • An overpayment invoices the order and is noted in its history. An underpayment beyond the tolerance is asked for again on the payment page.
  • A payment that completes after the order was cancelled is still forwarded to your wallet and noted on the order, but it does not invoice it.
  • Refunds are sent from your wallet: NoncePay holds nothing to refund from.

On this page