Description
Libyan Payments for MyPay connects your store to the MyPay payment platform (mypay.ly) so you can accept secure local payments across Libya.
This plugin allows merchants to accept payments directly on their WooCommerce store using Libya’s local payment methods, including bank cards, Edfali, Sadad, Mobicash, Yaser Pay, Sahara Pay, Masrafi Pay, and optional prepaid card when enabled for your merchant in MyPay. Orders are confirmed using a signed webhook, not by relying on the customer’s browser return alone.
Key features
- Seamless integration with WooCommerce and WooCommerce Blocks checkout
- Secure payment processing through MyPay hosted checkout
- Customizable payment gateway title and description
- Signed webhook verification using
X-MyPay-Signature - Alias gateways for supported MyPay payment methods
- Logging for troubleshooting
Requirements
- WordPress 6.5 or newer
- WooCommerce (from WordPress.org)
- PHP 7.4 or newer
- A MyPay merchant account with API credentials
Configuration
- Go to WooCommerce -> Settings -> Payments.
- Click on “MyPay” to configure the gateway.
- Enable the gateway by checking the “Enable MyPay Gateway” box.
- Enter your MyPay Client ID and Secret ID from your MyPay merchant dashboard.
- Use the environment switch:
- Production = unchecked, which targets
/pay/api/v1 - Sandbox = checked, which targets
/pay/sandbox/api/v1
- Production = unchecked, which targets
- Paste the Webhook Secret from your MyPay merchant dashboard.
- Keep the generated Webhook URL configured in your MyPay merchant API settings.
- Customize the title and description if desired.
- Save changes.
External services
This plugin connects to MyPay (https://mypay.ly) to process payments and synchronize merchant connection status when API credentials are configured. MyPay is required for checkout and order confirmation.
What is sent and when
- Payment API (
/authentication/token,/payment/create): order amount, currency, billing name, email, phone, order ID, return/cancel/webhook URLs, and selected gateway alias when a customer pays. - Webhook (incoming to your site): signed payment status payload from MyPay to finalize WooCommerce orders.
- Connection sync (
/plugin/connect,/plugin/disconnect,/plugin/heartbeat): site URL, plugin/WP/WC versions, environment (production/sandbox), enabled gateway flags, and plugin active state when you save MyPay credentials or change gateway settings. This supports merchant setup verification on MyPay. - Optional health telemetry (
/plugin/telemetry-consent): only when you explicitly enable “Share optional plugin health data with MyPay” in gateway settings (disabled by default). No customer, order checkout payload, or admin personal data is included.
This service is provided by MyPay:
- Terms of Service: https://mypay.ly/page/terms-and-conditions
- Privacy Policy: https://mypay.ly/page/privacy-policy
Production notes
- The plugin uses an embedded MyPay host and only needs the environment switch.
- The webhook secret in WooCommerce must match the webhook secret configured for the merchant key in MyPay.
- Alias gateways such as
yasr-pay,masrafi-pay,sahary-pay(shown in the store as Sahara Pay),moamalat(shown as Banking Card),edfali,sadad, andmobicashmust also exist and be enabled in the merchant gateway settings on MyPay. - The
prepaid-cardalias requires prepaid card payments to be enabled for your merchant in MyPay. - A customer returning from MyPay does not complete the WooCommerce order by itself; the signed webhook is the source of truth for final order completion.
Privacy & tracking
- Payment processing requires MyPay API calls once credentials are saved (Software as a Service).
- Operational connection sync is sent when credentials are configured to support merchant setup on MyPay.
- Optional plugin health telemetry is disabled by default and can be enabled in WooCommerce -> Settings -> Payments -> MyPay.
- No customer checkout payload or admin personal data is sent as part of optional plugin health metadata.
Credits
Developed by MyPay – https://mypay.ly
Installation
- Upload the plugin files to the
/wp-content/plugins/libyan-payments-for-mypaydirectory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the ‘Plugins’ screen in WordPress.
- Use the WooCommerce -> Settings -> Payments screen to configure the plugin.
FAQ
-
Where do I get API credentials?
-
From your MyPay merchant dashboard at mypay.ly.
-
Does this plugin work with WooCommerce Blocks checkout?
-
Yes. MyPay and its alias gateways register WooCommerce Blocks payment method support.
-
How does the plugin communicate with MyPay?
-
Outbound API calls use the WordPress HTTP API (
wp_remote_post).
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Libyan Payments for MyPay” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Libyan Payments for MyPay” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.7
- Restored production mypay.ly Author URI, API host, and Terms/Privacy links (removed local mypay.test URLs).
1.0.6
- Removed bundled Guzzle; all MyPay API calls now use the WordPress HTTP API.
1.0.5
- WordPress.org review updates: Tested up to only in readme; documented MyPay Terms and Privacy links.
1.0.4
- Renamed plugin to Libyan Payments for MyPay for WordPress.org trademark compliance.
1.0.3
- Verified webhooks before logging; WordPress.org directory compliance updates.
1.0.2
- Added alias gateways for Sadad (
sadad) and Mobicash (mobicash), including Blocks checkout support and merchant documentation. - Added optional plugin health telemetry opt-in (disabled by default) for WordPress.org compliance.
1.0.1
- Added optional alias gateway for prepaid card (
prepaid-card), including Blocks checkout support and merchant documentation.
1.0.0
- Added operational plugin tracking for MyPay support and compliance workflows
- Documented server-side tracking and privacy expectations in the readme
1.0
- Initial release
