API v1 — Overview
A simple two-step API to accept payments directly from your system.
Authentication
Every request carries two headers:
X-API-KEY: <Client ID from the merchant dashboard>
Authorization: Bearer <Access Token>
- Live token starts with
sl_live_and works once your account is activated. - Test token starts with
sl_test_, works immediately and never moves real money. - Generate tokens from Dashboard → Developer API → API v1. Regenerating invalidates the previous token.
Base URL
https://<your-domain>/api/v1
Response format
Success: { "status": 200, "result": { ... }, "message": "..." }
Error: { "error": { "status": 400, "code": "INVALID_OTP", "message": "..." } }
Gateways
| Alias | Gateway | Type | verify fields |
|---|---|---|---|
edfali |
Edfali | OTP (4 digits) | mobile_number |
sadadapi |
Sadad | OTP (6 digits) | mobile_number, birth_year |
yasrpay |
Yasr Pay | OTP (6 digits) | identity_card |
masrafipay |
Masrafi Pay | OTP (6 digits) | mobile_number |
saharypay |
Sahary Pay | OTP (6 digits) | mobile_number, birth_year |
localbankcards |
Local bank cards | Redirect | — |
Limits
- Amount in LYD with at most two decimals:
XXX,XX.X,XX.XX. - Max per transaction: 50,000 (live) / 500 (test). Minimum per gateway (10 LYD by default).
invoice_nomust be unique. Rate limit: 120/min (live), 30/min (test).