CPay for WooCommerce
A crypto payment gateway that feels native in WordPress. Customers pay in USDT or USDC from MetaMask or Trust Wallet, the money goes straight to your wallet, and every payment is AML-checked. No KYC, no KYB, no monthly plan. The plugin is built on the CPay PHP SDK, bundled in lib/cpay.
- WordPress
- 5.8+
- WooCommerce
- 6.0+, HPOS ready
- PHP
- 8.0+ with
gmp,bcmath,curl - Checkout
- Block and classic
- Languages
- English, Russian
- License
- MIT, open source
What you get
- Standard WooCommerce gateway. Configured under WooCommerce → Settings → Payments, shown next to your other methods.
- Block and classic checkout. Works with the block-based Cart/Checkout and the shortcode checkout. Compatible with High-Performance Order Storage.
- Any store currency. Invoices are always in USD stablecoins; your currency is detected automatically and converted by a daily rate with your markup, or by a fixed rate.
- Invoices signed locally. The shop key never leaves your server and can live in
wp-config.php. - Digital and physical orders. Separate statuses after payment, including custom statuses from other plugins.
- Receipts everywhere. In the admin order screen, in My account, on the thank-you page and in order emails.
- Safe confirmation. Webhook with cryptographic proof plus a success page that double-checks the payment.
- Partner commission, debug log, clean uninstall. Everything a production store needs.
Installation
Upload the plugin
Go to Plugins → Add New → Upload Plugin, choose
cpay-woocommerce.zip, click Install Now and then Activate. Exchange rates are downloaded right away.Open the gateway settings
Go to WooCommerce → Settings → Payments → CPay (Crypto USDT/USDC), or use the Settings link in the plugins list.
Manual install: unzip into wp-content/plugins/ so the path is wp-content/plugins/cpay-woocommerce/cpay-woocommerce.php.
Configuration
Create a shop with a dedicated account
Make a new MetaMask account just for the shop and create your shop with it. Never use the wallet that receives your money.
Enter the shop key
Paste the private key of the shop account — or, better, add
define('CPAY_PRIVATE_KEY', '...');towp-config.php. The shop address is shown automatically.Set the payout wallet
Enter the wallet that receives USDT/USDC. It must differ from the shop account.
Connect the webhook
Copy the Webhook URL and Success page URL from the top of the settings page into your shop settings on dappcrypto.github.io.
Choose rates and statuses
Pick the rate mode, invoice lifetime and order statuses, tick Enable CPay crypto payments and save.
Run a test order
Pay a small order of a few dollars to check the whole flow.
Key settings
| Setting | What it does | Default |
|---|---|---|
| Default network | Network preselected on the payment page: 1 Ethereum, 56 BNB Smart Chain. The customer can switch. | 1 |
| Exchange rate mode | Automatic (daily public rate + markup) or Fixed (your own rate). | Automatic |
| Markup / fee, % | Added on top of the converted amount, e.g. 1.5 = +1.5%. | 0 |
| Invoice lifetime | How long the invoice can be paid, in minutes. | 1440 (24 h) |
| Order ID offset | Added to the WooCommerce order ID. Use different offsets if several stores share one shop. | 0 |
| Digital / physical status | Status after payment for fully digital orders and for everything else. | Completed / Processing |
| Partner wallet and commission | 100 = 1% of each payment goes to the partner wallet. | off |
| Debug log | Writes to WooCommerce → Status → Logs, source cpay. | off |
How a payment works
The customer places the order
CPay is selected at checkout.
An invoice is created
The total is converted to USD and signed locally. The order goes On hold, stock is reduced, the cart is emptied and the customer goes to the secure payment page.
The customer pays on-chain
From MetaMask or Trust Wallet, on the network they choose.
The order is marked as paid
The webhook or the success page verifies the proof; your status is applied, the receipt link is stored and an order note is added.
Low-traffic store?
Exchange rates are refreshed by WP-Cron. For exact timing on a quiet site, trigger WP-Cron from a real server cron job.
Troubleshooting
| Problem | What to check |
|---|---|
| Gateway not shown at checkout | Is it enabled? Are the key and payout wallet set? Are gmp, bcmath, curl installed? Is a rate available on the settings page? |
| Order not marked as paid | The webhook URL in your dappcrypto shop must match the settings page exactly. Check the cpay log. |
| "Order not found" on the success page | The Order ID offset was changed after the invoice was created. |
| No exchange rate | Allow outgoing HTTPS to open.er-api.com, or switch to a fixed rate. |
Full settings reference, endpoints, WP-Cron hooks and uninstall options are in the README on GitHub.
Supported networks
- Ethereum gas in ETH
- BNB Smart Chain gas in BNB
- Arbitrum gas in ETH
- Base gas in ETH
- Polygon gas in POL
FAQ
Does it work with the new block checkout?
Yes. The plugin supports both the block-based Cart/Checkout and the classic shortcode checkout, and is compatible with HPOS.
What does it cost?
The plugin is free. 99% of each payment goes to you and 1% is the DAppCrypto service fee; connecting a shop costs a one-time network fee.
What if a customer pays after the order was cancelled?
The order is still marked as paid and a note asks you to check stock.
Is order data removed when I delete the plugin?
Settings, key, rates and cron jobs are removed. Order receipts stay with your orders unless you define CPAY_WC_REMOVE_ORDER_DATA before deleting.
Start with a shopThe plugin signs invoices for a CPay shop. Create one with a dedicated MetaMask account, then paste its key into the plugin settings.
Create your shop