Stablecoin Payments for WC — Documentation
Accept USDT, USDC, DAI, and PYUSD in your WooCommerce store — self-hosted, non-custodial, always free.
Overview
Stablecoin Payments for WooCommerce lets customers pay with supported stablecoins directly from their own wallet to yours. The plugin is non-custodial: it never holds customer funds or routes payments through a third-party payment processor.
Customers choose an enabled asset at checkout, send the exact quoted amount to your configured wallet address, then submit their transaction hash for verification. WooCommerce remains the source of truth for the order and its status.
Requirements
| WordPress | 6.7 or later |
| WooCommerce | Required |
| PHP | 8.1 or later |
| Checkout | Classic WooCommerce Cart and Checkout in V1 |
| Verification | An Etherscan API key is required |
| Wallet | At least one enabled asset with a valid receiving address |
| Licence | Always free — no licence key required |
Quick Start
- Install & activate — Requires WordPress 6.7+, WooCommerce and PHP 8.1+. Use Classic WooCommerce Cart and Checkout in V1.
- Add an Etherscan API key — Get a free key at etherscan.io/apis. One key verifies transactions across the configured supported networks.
- Choose a network and enable assets — Start with Sepolia for testing, or select Live for Ethereum, Polygon and BSC. Enable only the assets you intend to accept.
- Set each receiving address and payment rule — Add a valid wallet address for every enabled asset, then set its confirmation requirement, price-freeze window, timeout and tolerance.
- Enable the gateway and test an order — The gateway appears at checkout automatically. Complete a Sepolia test before accepting live payments.
User Guide
Configure the gateway
General settings
| Etherscan API Key | Required for transaction verification. One key is used across the configured supported networks. |
| Network | Choose Testnet for Sepolia ETH testing, or Live for Ethereum, Polygon and BSC assets. |
| Gateway title and description | The text customers see when selecting Stablecoin Payments at checkout. |
| Stablecoin discount | Optional percentage discount applied only when the customer selects this payment method. |
Asset settings
Enable only the assets you intend to receive. Each enabled asset has its own payment rules.
| Receiving address | Add a valid receiving wallet address for the enabled asset. You may use the same address for multiple assets only where that wallet supports the relevant network. |
| Confirmations | The number of blockchain confirmations required before payment is accepted. The default is 1 on Sepolia and 12 on live networks; adjust this to suit your risk policy. |
| Price-freeze window | How long the quoted crypto amount remains valid after checkout begins. |
| Timeout | How long CCP waits for the submitted transaction to meet its verification requirements before the payment window expires. |
| Overpay / underpay tolerance | The permitted percentage difference from the quoted amount. Keep this low unless you have a specific reason to allow a wider variance. |
Supported assets
The checkout displays only assets enabled and configured in your settings.
| Network | Available assets | Chain ID |
|---|---|---|
| Ethereum | USDT, USDC, DAI, PYUSD | 1 |
| Polygon | USDT, USDC, DAI | 137 |
| BSC | USDT, USDC, DAI | 56 |
| Sepolia testnet | ETH | 11155111 |
What customers see
After selecting Stablecoin Payments at Classic Checkout, the customer:
- chooses an enabled asset;
- receives the exact payment amount, receiving address and payment deadline;
- sends payment from their wallet and submits the transaction hash;
- waits while CCP verifies the transaction; and
- returns to the normal WooCommerce order-received page once payment is confirmed.
If the customer leaves before submitting a transaction hash, they can return through the normal WooCommerce order endpoint and complete payment while the payment window remains active.
Payment verification and common outcomes
How verification works
CCP verifies the transaction hash against the selected asset, expected amount, configured receiving address and required confirmation count. A transaction hash can only be submitted for one order.
Waiting for blockchain confirmations
The transaction has been found but has not yet reached the required confirmation count. The order remains on hold until verification completes or the payment window expires.
Asset, amount or recipient mismatch
CCP does not complete the order. Check the selected asset, network, destination address and transaction amount before investigating the payment manually.
Payment window expired
The customer must create a new order. The original order remains available for merchant review and is not automatically completed.
Etherscan or exchange-rate issue
Confirm the API key is saved, the transaction is visible in the relevant block explorer, and the server can make outbound requests. Stablecoin price conversion falls back safely if a rate provider is temporarily unavailable.
Developer Notes
CCP uses WooCommerce’s normal order return flow by default. No custom thank-you page is required: the payment and confirmation card is displayed within WooCommerce’s native order-received and order endpoints.
Use a custom completion page
Use this filter only when a site has a non-standard post-payment route. It receives the normal WooCommerce return URL and the order object.
add_filter('ccp_completion_url', function ($url, $order) {
return $url;
}, 10, 2);Use a custom order-failed page
For a payment amount mismatch, failed blockchain transaction or timeout, CCP normally keeps the order on hold for merchant review. Use this filter to direct those terminal states to a custom page.
add_filter('ccp_terminal_payment_url', function ($url, $order, $status) {
if (!in_array($status, ['mismatch', 'failed', 'timeout'], true)) {
return $url;
}
return add_query_arg([
'order_id' => $order->get_id(),
'key' => $order->get_order_key(),
'reason' => $status,
], home_url('/order-failed/'));
}, 10, 3);Important: A custom page must validate the WooCommerce order key before displaying order-specific details. This filter changes the destination only; CCP still leaves terminal payments on hold.
Technical reference
| WordPress | 6.7 or later |
| WooCommerce | Required; Classic Cart and Checkout in V1 |
| PHP | 8.1 or later |
| Transaction verification | Etherscan V2 API for configured EVM networks |
| Price conversion | CoinGecko, with safe stablecoin fallback behaviour |
Changelog
+ Stablecoin payments for configured assets on Ethereum, Polygon and BSC, with Sepolia ETH for testing.
+ Native WooCommerce order-received and order-endpoint payment experience, including return-to-payment support.
+ Transaction verification for the expected asset, amount, receiving address, network and confirmation threshold.
+ Duplicate transaction-hash protection and clear handling for mismatched, failed or expired payments.
+ Per-asset confirmation, timeout, price-freeze and tolerance settings, plus an optional stablecoin discount.
~ Classic WooCommerce Cart and Checkout supported in V1.
~ Always free and self-hosted; no licence key or third-party payment processor required.
Quick Reference
| WordPress | 6.7 or later |
| WooCommerce | Required; Classic Cart and Checkout supported in V1 |
| PHP | 8.1 or later; bcmath recommended |
| Verification API | Etherscan V2 API key required |
| Live assets | USDT, USDC, DAI and PYUSD across Ethereum, Polygon and BSC |
| Testing | Sepolia ETH testnet supported |
| Order verification | Action Scheduler, with WP-Cron fallback |
| Licence | Always free — no licence key required |
