Accept crypto payments in WooCommerce with the Moonvex plugin
Moonvex has an official plugin, Moonvex Crypto Payments for WooCommerce. It adds a payment method that sends the customer to the Moonvex checkout, where they pick the coin and network and pay; a signed webhook then marks
Moonvex has an official plugin, Moonvex Crypto Payments for WooCommerce. It adds a payment method that sends the customer to the Moonvex checkout, where they pick the coin and network and pay; a signed webhook then marks the order paid. Setup takes about ten minutes and needs no code.
Step by step
1. Install and activate the plugin
Download the archive from https://moonvex.org/downloads/moonvex-crypto-payments.zip (the plugin is also coming to the WordPress.org directory). In the WordPress admin open Plugins β Add New β Upload Plugin, choose the zip file, click βInstall Nowβ, then βActivateβ. The plugin requires an active WooCommerce and PHP 7.4+.
2. Create a secret API key
In the Moonvex dashboard go to βIntegrationβ β βCreate keyβ β type βSecretβ (sk_live_β¦). The key is shown only once: paste it straight into the plugin settings (step 4) and do not keep it in emails or chats.
3. Add the webhook
On the same βIntegrationβ page add a webhook with the address below, replacing your-shop with your store domain; https is required. The exact URL is also shown in the plugin settings. Copy the webhook signing secret (whsec_β¦): the plugin checks the signature of every event with it and applies each event once.
https://your-shop/wp-json/moonvex/v1/webhook
4. Enable Moonvex in WooCommerce
Open WooCommerce β Settings β Payments β Moonvex, tick βEnableβ, paste the secret API key and the webhook secret and save. You can also change the method name, the text the customer sees at checkout and the payment window. The store currency (WooCommerce β Settings β General) must be USD, EUR, UAH, RUB or a coin such as USDT; with any other currency the method stays hidden. The plugin works with both the block-based and the classic checkout and is compatible with HPOS.
5. How an order gets paid
The customer chooses crypto at checkout and lands on the Moonvex checkout page, which shows the order number and items as βYou are paying forβ. There they pick the coin and network, see the exact amount, address and QR code and pay from any wallet or exchange; until funds arrive they can switch to another coin. After network confirmations the webhook moves the order to Processing (Completed for virtual and downloadable orders, as usual in WooCommerce). If the customer paid less, the order goes On hold with a note showing the amount received. The βBack to the shopβ button returns the customer to the βOrder receivedβ page.
6. Test with a real payment
Moonvex has no test network: everything runs on mainnets. First press βSend testβ next to the webhook under βIntegrationβ: the delivery log should show a 200 response. Then place an order and pay a small amount, for example 1 USDT on TRON. It is a regular payment and the money lands on your Moonvex balance. The order notes show each step, from the detected transfer to the payment.
Pitfalls
- If the method does not appear at checkout, check the store currency: USD, EUR, UAH, RUB or a coin are supported, and with other currencies the method is hidden.
- Security and caching plugins sometimes lock down /wp-json/. Make sure /wp-json/moonvex/v1/webhook accepts POST requests from outside and is not cached.
- A customer returning to the store is not proof of payment: the order changes status only after the signed webhook arrives.
- Refunds are not sent from WooCommerce: send the money back as a payout from the Moonvex dashboard to the customer's address.
FAQ
Is there an official Moonvex plugin for WordPress?
Yes: Moonvex Crypto Payments for WooCommerce. Download it from https://moonvex.org/downloads/moonvex-crypto-payments.zip and install it via Plugins β Add New β Upload Plugin; it is also coming to the WordPress.org directory.
How do refunds work?
Automatic refunds from WooCommerce are not supported. Send the refund from the Moonvex dashboard as a payout to the customer's address, then mark the order refunded in WooCommerce.
Is there a test mode or a sandbox?
No, there is no test network: Moonvex runs on mainnets only. Check the webhook with the βSend testβ button in the dashboard and the whole flow with a small real payment, for example 1 USDT on TRON.
Which store currencies are supported?
USD, EUR, UAH, RUB or a coin such as USDT. With any other store currency the Moonvex method is hidden at checkout.
The customer came back to the store but the order is unpaid. Why?
Returning to the store does not confirm payment. The order becomes paid when the payment.confirmed webhook arrives, after the required number of network confirmations. Check the order notes and the delivery log under βIntegrationβ.
Originally published at: moonvex.org/en/guides/wordpress-woocommerce
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.