Introduction
The MyPay API is a comprehensive solution for electronic payment processing, enabling merchants to accept online payments securely and easily. The API supports multiple Libyan payment gateways with a secure and reliable flow.
Confirm payment outcomes with Webhooks; use Payments → Payment Status (Enquiry) only for reconciliation.
Available Environments
| Environment | Base URL | Use |
|---|---|---|
| Production | https://mypay.ly/pay/api/v1/ |
Real transactions only |
| Sandbox | https://mypay.ly/pay/sandbox/api/v1/ |
Testing and development |
[!WARNING] Use the Sandbox environment for testing and development, and the Production environment for real transactions only.
[!NOTE] Sandbox API keys must call
/pay/sandbox/api/v1/. Use the documented numbers and cards in Test Data while integrating. Never use production credentials or the production base URL for test payments.
Supported Payment Gateways
| Gateway | Alias | Description |
|---|---|---|
| Banking card | moamalat |
Payment via banking cards |
| Masrafi Pay | masrafi-pay |
Jumhouria Bank |
| Yasr Pay | yasr-pay |
National Commercial Bank |
| Sahara Pay | sahary-pay |
Sahary Bank |
| Edfali | edfali |
Bank of Commerce and Development |
| SADAD | sadad |
SADAD payment gateway |
| Mobicash | mobicash |
Card payment via Mobicash |
Supported Currencies
| Code | Currency |
|---|---|
LYD |
Libyan Dinar |
Official plugins
| Platform | Guide |
|---|---|
| Odoo 18 | Odoo — Merchant installation and setup |
| WooCommerce | WooCommerce — Merchant installation and setup |
| Flutter | Flutter Package — Merchant installation and setup |
API Security
We take security very seriously. The following measures are implemented to protect your data:
- HTTPS Encryption: All communications are encrypted using TLS protocol.
- Secure Tokens: We use unique short-lived Access Tokens for authentication.
- Validation: All input data is strictly validated.
- Rate Limiting: To protect the system from excessive use.
- Logging: Comprehensive logging of all operations for auditing and review.