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:flushOr 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
- The customer picks Pay with crypto and places the order, which is created in Pending Payment.
- 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.
- The customer picks a coin and pays. Each payment is forwarded to your wallet as soon as it confirms.
- Once the payments cover the order, NoncePay sends the link-paid callback. The module verifies its
x-ca-signatureagainst 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. - 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
| Setting | Default | What it does |
|---|---|---|
| Wallets | empty | One per family: EVM, Tron, Bitcoin, Litecoin, Bitcoin Cash, Dogecoin, Solana; split syntax accepted |
| Coins offered | every coin of your wallets | Optional comma-separated tickers such as trc20/usdt,bep20/usdt,btc |
| Merchant name, logo | store name, none | Shown on the payment page; the logo must be an https URL |
| Underpayment tolerance | 0% | 0 to 1%: how much less than the order total still invoices it |
| Debug log | off | Logs 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.
Accept crypto payments with PrestaShop
Add a non-custodial crypto payment module to PrestaShop with NoncePay. Customers pay their orders in USDT, USDC, BTC, ETH, SOL and more, forwarded to your own wallets.
Payment links
Share a hosted crypto payment page with one request. No checkout to build, funds forwarded to your own wallet.