WooCommerce
WooCommerce — Merchant installation and setup
Overview
The MyPay plugin for WooCommerce connects your store to the MyPay payment platform (mypay.ly) so you can offer local payment methods at checkout. Orders are confirmed using a signed webhook, not by relying on the customer’s browser return alone.
Guide version: 1.0.0 (aligned with the plugin header).
Requirements
| Requirement | Detail |
|---|---|
| WordPress | 5.0 or newer |
| WooCommerce | Installed and active |
| PHP | 7.0 or newer |
| HTTPS | Strongly recommended for production (payments and webhook delivery) |
| MyPay merchant account | Active, with API and gateway access enabled |
What you need from the MyPay dashboard
Before configuring the plugin, prepare the following in your MyPay merchant dashboard:
- Client ID and Secret ID (integration / API credentials).
- Webhook Secret (used to verify signatures on incoming webhook requests).
- Enable the payment gateways you want to offer in MyPay gateway settings (if your dashboard separates gateways per alias).
Installation steps
1) Install from WordPress.org
Install Libyan Payments for MyPay from the WordPress plugin directory:
- In wp-admin: Plugins → Add New.
- Search for Libyan Payments for MyPay (or open the plugin page on WordPress.org and install from there).
- Click Install Now, then Activate.
The plugin folder name is libyan-payments-for-mypay.
2) Confirm WooCommerce
Make sure WooCommerce is running and that your store currency and checkout settings match how you operate.
Configuration and connection to MyPay
- Go to WooCommerce → Settings → Payments.
- Open MyPay (the main gateway).
- Enable the gateway (for example Enable MyPay).
- Enter Client ID and Secret ID from the MyPay dashboard.
- Environment:
| Mode | Plugin setting | API path |
|---|---|---|
| Production | Sandbox mode off | /pay/api/v1 |
| Sandbox | Sandbox mode on | /pay/sandbox/api/v1 |
- Copy the Webhook URL shown in the plugin and add it to your MyPay webhook/API settings (per your dashboard UI).
- Paste the same Webhook Secret from MyPay into the plugin field — it must match exactly so signatures (
X-MyPay-Signature) validate. - Save changes.
Optional alias gateways
If your MyPay account exposes alias gateways, enable each corresponding method under Payments in WooCommerce. Credentials and environment still come from the main MyPay gateway settings.
| Alias | Method |
|---|---|
moamalat |
Banking card |
masrafi-pay |
Masrafi Pay |
yasr-pay |
Yasr Pay |
sahary-pay |
Sahara / Sahary Pay |
edfali |
Edfali |
sadad |
SADAD |
mobicash |
Mobicash |
How orders are confirmed
- The customer returning from the payment page is not enough on its own to finalize an order safely.
- The authoritative source for final payment status is a signed webhook from MyPay; the plugin is built around that flow.
Troubleshooting
| Issue | What to check |
|---|---|
| Payment methods do not appear | Plugin is active, method enabled under Payments, and gateway enabled in MyPay |
| Order does not complete after payment | Webhook Secret matches, HTTPS is available, and nothing blocks POST to the webhook URL |
| Sandbox vs production errors | Sandbox toggle in the main MyPay gateway settings |
Privacy and tracking (summary)
- Operational tracking on MyPay’s side is limited (for example connectivity checks, webhook health, and compliance-related support), per platform policy.
- Full customer data or complete order payloads are not sent as part of optional plugin health metadata, as described in the plugin policy/readme.
Related docs
- Authentication
- Payments
- Webhooks
- Test Data
- Odoo — Odoo 18 modules (Status / Cron + optional webhook)
- Flutter Package — Native in-app checkout