وثائق المطورين
روابط الدفع (API)
أنشئ روابط دفع أو فواتير برمجياً وأرسلها لعملائك.
روابط الدفع مناسبة للفواتير والمبيعات عن بُعد دون الحاجة إلى موقع إلكتروني. يمكن إنشاؤها من لوحة التحكم أو عبر الـ API، وتدعم تاريخ إصدار وانتهاء للفاتورة.
curl --location 'https://app-api.nmapay.com/api/v1/payment-links' \
--header 'X-API-KEY: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"orderId": "INV-2026-0142",
"amount": 450.75,
"currency": "SAR",
"description": "Consulting retainer — March",
"customerDetails": { "name": "Sara Ali", "email": "sara@example.com", "phone": "+9665xxxxxxx" },
"issueDate": "2026-03-01",
"expireDate": "2026-03-08",
"successUrl": "https://your-site.com/success",
"failureUrl": "https://your-site.com/failure"
}'إن لم يُحدَّد expireDate فسيُضبط تلقائياً على سبعة أيام بعد issueDate.
