Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/amolood/zakhir-woocommerce-payment/archive/refs/heads/main.zip
Zakhir Payment Gateway for WooCommerce
Accept payments via the Zakhir wallet in your WooCommerce store.
Hosted checkout · Webhook notifications · Staging support · HPOS compatible.
Built by Digitalize Lab · Maintained by Abdalrahman Molood
Requirements
| Dependency | Version |
|---|---|
| PHP | ^8.0 |
| WordPress | ^6.0 |
| WooCommerce | ^7.0 |
Installation
Option A — Upload ZIP
- Download the latest release ZIP from GitHub Releases
- In your WordPress admin go to Plugins → Add New → Upload Plugin
- Upload the ZIP and click Install Now, then Activate
Option B — Manual Upload
- Clone or download this repository
- Copy the
zakhir-payment-gatewayfolder intowp-content/plugins/ - Go to Plugins → Installed Plugins and activate Zakhir Payment Gateway
Configuration
Go to WooCommerce → Settings → Payments → Zakhir and fill in the following:
General
| Field | Description |
|---|---|
| Enable / Disable | Toggle the gateway on or off |
| Environment | Production for live payments, Staging for testing |
| Title | Payment method label shown to customers at checkout |
| Description | Short description shown under the payment method |
Production Credentials
Obtain these from your Zakhir merchant dashboard:
| Field | Description |
|---|---|
| API Base URL | Provided by Zakhir upon merchant onboarding |
| Tenant ID | Your merchant tenant identifier |
| Profile ID | Your merchant profile identifier |
| API Key | Your secret API key |
Staging Credentials
Fill in the staging equivalents when Environment is set to Staging.
Advanced
| Field | Description |
|---|---|
| API Timeout | Seconds to wait for Zakhir API responses (default: 15) |
| Debug Logging | Logs API calls to WooCommerce → Status → Logs |
Webhook Setup
The plugin automatically registers a webhook endpoint at:
POST https://yoursite.com/wc-api/zakhir
Set this URL in your Zakhir merchant dashboard as the notification URL. Zakhir will POST payment status updates here when a payment is completed or rejected.
Payment Flow
1. Customer selects "Zakhir Wallet" at checkout and places the order
2. Plugin calls POST /api/ecommerce/payments → receives checkout URL
3. Customer is redirected to Zakhir's hosted checkout page
4. Customer completes payment on Zakhir's platform
5. Zakhir POSTs a webhook to /wc-api/zakhir with status=COMPLETED
6. Plugin marks the WooCommerce order as Processing/Completed
7. Customer lands on the WooCommerce thank-you page
The plugin also polls the payment status once on the thank-you page as a fallback in case the webhook arrives late.
Architecture
zakhir-payment-gateway/
├── zakhir-payment-gateway.php Plugin entry point, auto-discovery
├── includes/
│ ├── class-wc-zakhir-gateway.php WC_Payment_Gateway — checkout, admin settings
│ ├── class-zakhir-api.php HTTP client for Zakhir API (create, status, cancel)
│ └── class-zakhir-webhook-handler.php Handles incoming Zakhir webhook POSTs
├── assets/
│ ├── css/checkout.css Minimal checkout styles
│ └── images/zakhir-logo.png Payment method icon
└── languages/ i18n/l10n POT file location
Changelog
See CHANGELOG.md.
Credits
| Author | Abdalrahman Molood |
| Company | Digitalize Lab |
| Gateway | Zakhir |
License
MIT License — see LICENSE.