Overview
OCPay for WooCommerce is a payment gateway plugin that integrates OCPay with your WooCommerce store. Accept secure payments in Algerian Dinars (DZD) with minimal setup.Easy Installation
Install from plugin ZIP - no coding required
Auto Status Polling
Automatically checks payment status every 20 minutes
WooCommerce Blocks
Works with both classic and block checkout
Sandbox Testing
Test with sandbox mode before going live
Requirements
1
WordPress & WooCommerce
- WordPress 5.0 or higher
- WooCommerce 4.0 or higher
- PHP 7.2 or higher
2
SSL Certificate
SSL/HTTPS enabled on your site (required for payments)
3
OCPay Account
Active merchant account at oneclickdz.com
Quick Setup
1. Install the Plugin
1
Download Plugin
Download the plugin from GitHub
2
Upload to WordPress
- Go to Plugins → Add New
- Click Upload Plugin
- Select the ZIP file
- Click Install Now
3
Activate
Click Activate Plugin after installation
2. Get Your API Keys
- Log in to oneclickdz.com
- Go to API Settings
- Copy both keys:
- Sandbox Key: For testing
- Production Key: For live payments
3. Configure Plugin
1
Open Settings
Go to WooCommerce → Settings → Payments
2
Select OCPay
Click on OCPay in the payment methods list
3
Enable & Configure
- Enable/Disable: Check to enable OCPay
- Title: “OCPay - OneClick Payment” (shown to customers)
- Description: Payment method description
4
Add API Keys
- Sandbox API Key: Your sandbox key
- Production API Key: Your production key
- API Mode: Select “Sandbox” for testing
5
Configure Options
- Fee Mode: Choose who pays transaction fees
NO_FEE: You absorb fees (best customer experience)SPLIT_FEE: 50/50 splitCUSTOMER_FEE: Customer pays all fees
- Order Status: Choose status after successful payment
Completed: For digital products (auto-delivery)Processing: For physical products (requires fulfillment)
6
Save Settings
Click Save changes
Testing in Sandbox
Always test in Sandbox mode before accepting real payments
-
Set to Sandbox Mode
- API Mode:
Sandbox (Testing) - Use your Sandbox API Key
- API Mode:
-
Create Test Order
- Go to your store
- Add product to cart
- Proceed to checkout
- Select OCPay payment method
- Complete checkout
-
Test Payment Flow
- You’ll be redirected to OCPay payment page
- Complete the test payment
- Return to your store
-
Verify Order Update
- Check order status in WooCommerce
- Should update to your configured status
- Check plugin logs: WooCommerce → OCPay → Activity Logs
Going Live
When ready to accept real payments:1
Switch to Production
- Go to WooCommerce → Settings → Payments → OCPay
- Change API Mode to
Production (Live) - Save changes
2
Verify SSL
Ensure SSL/HTTPS is properly configured on your site
3
Test Order
Create a small test order to verify everything works
Key Features
Automatic Status Polling
The plugin automatically checks payment status every 20 minutes using WordPress cron:- No manual intervention needed
- Orders automatically update when payment confirms
- Failed payments marked as “On Hold”
Manual Status Check
Customers can manually check payment status:- Available on order page
- Click “Check Payment Status” button
- Real-time AJAX update
Fee Modes
| Mode | Description | Best For |
|---|---|---|
| NO_FEE | You pay all fees | Best customer experience |
| SPLIT_FEE | 50/50 split | Shared cost |
| CUSTOMER_FEE | Customer pays | Maximize profit |
Fee Structure: 0% on balance, 1% withdrawal fee only
Troubleshooting
Payment Gateway Not Configured
Problem: Error message when placing order Solution:- Verify API key is entered
- Check API key matches the mode (Sandbox/Production)
- Test connection in plugin settings
Orders Not Updating
Problem: Orders stay “Pending” after payment Solution:- Check WordPress cron is working
- Verify payment reference is saved in order
- Enable Debug Mode in plugin settings
- Check Activity Logs for errors
SSL/HTTPS Required
Problem: “SSL required” error message Solution:- Contact your hosting provider to enable SSL
- Use free Let’s Encrypt certificate
- Verify site URL starts with
https://
Debug Mode
Enable for troubleshooting:- Go to WooCommerce → Settings → Payments → OCPay
- Check Enable Debug Logging
- Save changes
- View logs at WooCommerce → OCPay → Activity Logs
Support & Resources
GitHub Repository
Plugin source code and issues
API Documentation
Detailed API reference
OCPay Dashboard
Manage your merchant account
Contact Support
Get help from our team
Next Steps
OCPay Best Practices
Learn production-ready tips and security best practices

