WooCommerce Plugin
The DeroPay for WooCommerce plugin adds DERO as a payment method in your WooCommerce store. It's a thin PHP adapter that connects to your DeroPay gateway server.
Prerequisites
- WordPress with WooCommerce installed
- A running DeroPay gateway server
Install the Plugin
- Download the
deropay-for-woocommercefolder fromplugins/woocommerce/in the DeroPay repository - Upload it to
wp-content/plugins/on your WordPress site - Activate the plugin in WordPress Admin → Plugins
Configure the Gateway
Go to WooCommerce → Settings → Payments → DeroPay and enter:
| Setting | Value |
|---|---|
| Enable | Yes |
| Gateway URL | https://your-gateway:3080 |
| API Key | Your gateway API key |
| Webhook Secret | Your webhook secret (must match gateway config) |
Test a Payment
- Add a product to your cart
- Go to checkout
- Select "Pay with DERO"
- You'll see the DERO amount, QR code, and integrated address
- Send DERO from your wallet
- Order status updates automatically via webhook
How It Works
Customer → WooCommerce → DeroPay Plugin → Gateway Server → DERO Wallet
↓
Webhook back
↓
Order marked "Processing"- Customer selects "Pay with DERO" at checkout
- Plugin calls
POST /invoiceson your gateway with the order total - Gateway creates an invoice and returns the payment details
- Plugin displays QR code and address on the "Order Received" page
- Gateway monitors the wallet for incoming payment
- On confirmation, gateway sends a webhook to WooCommerce
- Plugin verifies the HMAC signature and marks the order as "Processing"
Fiat Pricing
WooCommerce stores typically price products in USD, EUR, etc. The plugin sends the fiat amount and currency to the gateway, which converts to DERO at the current market rate. The customer sees both the fiat price and the DERO equivalent.
Webhook Endpoint
The plugin registers a webhook endpoint at:
https://yourstore.com/?wc-api=deropay_webhookConfigure your DeroPay gateway to send webhooks to this URL.
The webhook handler verifies the HMAC-SHA256 signature before processing. Make sure the webhook secret matches between your gateway and WooCommerce settings.
Plugin Files
| File | Purpose |
|---|---|
deropay-for-woocommerce.php | Main plugin file, registers gateway + webhook |
includes/class-deropay-gateway.php | WC_Payment_Gateway implementation |
includes/class-deropay-api-client.php | HTTP client for the gateway REST API |
includes/class-deropay-webhook-handler.php | HMAC-verified webhook handler |
assets/dero-icon.svg | Payment method icon |