مرجع عام

Billing

كل نقاط النهاية في هذه المجموعة. افتح أي واحدة لعرض معاملاتها ومثال عملي عليها.

3 نقاط النهاية

اعرض الصفحة بصيغة Markdown

Billing

3
GET /api/v1/billing/invoices List invoices across subscribers prm_billing

Every invoice the caller may see, in one list, with filters for reconciling a period. A caller without tenant-wide visibility sees only invoices belonging to subscribers in their own manager subtree.

المصادقة
رمز موظّف أو جلسة
تتطلب صلاحية
prm_billing Billing & invoices

username is populated only on this cross-subscriber list, which joins the subscriber table. The per-subscriber list and the single-invoice fetch leave it empty, because there the subscriber is already known.

المعاملات

المعامل الوصف
filter[status] query · string Payment status.
filter[username] query · string Narrow to one subscriber by username.
filter[date_from] query · string Inclusive lower bound. A malformed value is a 400, not an ignored filter.
filter[date_to] query · string Inclusive upper bound.
filter[amount_min] query · number Inclusive lower amount bound.
filter[amount_max] query · number Inclusive upper amount bound.
الاستجابة 200 OK
{
  "data": [
    {
      "id": 51204,
      "user_id": 4711,
      "username": "ahmed",
      "invoice_number": "INV-2026-000512",
      "type": "activation",
      "amount": 171.00,
      "discount": 0.00,
      "vat": 14.00,
      "status": "paid",
      "description": "Home 20M (activate)",
      "payment_method": "manager_balance",
      "due_date": "2026-09-20 00:00:00",
      "paid_on": "2026-09-20 09:15:02",
      "created_by_manager_id": 41,
      "created_by_name": "cairo-reseller",
      "created_at": "2026-09-20 09:15:02"
    }
  ],
  "meta": { "page": 1, "page_size": 50, "total": 1284, "has_next": true }
}
POST /api/v1/billing/invoices Issue an invoice prm_billing

Creates an invoice against a named subscriber from line items. discount and vat are percentages from 0 to 100, and the total is computed from the items — never taken from the request.

المصادقة
رمز موظّف أو جلسة
تتطلب صلاحية
prm_billing Billing & invoices
حد المعدل
t_mutate

discount and vat are PERCENTAGES, and the validator rejects anything above 100. Sending 171.00 in the vat field to mean "171 in tax" is a 400, not a silently large invoice.

المعاملات

المعامل الوصف
user_idمطلوب body · integer The subscriber being invoiced.
itemsمطلوب body · array At least one line, each with name, qty, unit_price and an optional per-line tax.
discount body · number Percentage from 0 to 100, not an amount.
vat body · number Percentage from 0 to 100, not an amount.
due_date body · string yyyy-MM-dd HH:mm:ss in UTC.
mark_paid body · boolean Record the new invoice as already settled.
POST /api/v1/billing/invoices/bulk-pay Billing & invoices prm_billing
المصادقة
رمز موظّف أو جلسة
تتطلب صلاحية
prm_billing Billing & invoices
حد المعدل
t_mutate

مقروء مباشرة من الموجّه الذي يخدم هذه النسخة. لم يُضَف بعد وصف مكتوب لنقطة النهاية هذه.

مكتوب لتقرأه الأدوات الآلية أيضًا

المرجع عام ولا يتطلب حسابًا، فتستطيع أداة لم تَرَ X-Radius من قبل أن تصل إلى أول استدعاء صحيح بنفسها.

/llms.txt
فهرس لكل صفحة، مع ملخّص من سطر واحد.
/llms-full.txt
المرجع كاملًا في ملف Markdown واحد، دون تنقّل يحتاج إلى زحف.
/openapi.json
‏OpenAPI 3.1، مُولَّد من الموجّه الذي يخدم هذه النسخة.
/skill.md
ملف مهارة جاهز لمساعد آلي: المصادقة وشكل الاستجابة ورموز الأخطاء في صفحة واحدة.
<page-url>.md
أضف ‎.md إلى رابط أي صفحة في المرجع لتحصل على الصفحة نفسها بصيغة Markdown.
Accept: text/markdown
أرسل هذه الترويسة على الرابط المعتاد فتصلك الإجابة بصيغة Markdown بدلًا من الصفحة.
سلّم هذا السطر إلى مساعدك الآلي
اقرأ https://x-radius.com/llms.txt، ثم اجلب نقطة النهاية التي تحتاجها بصيغة Markdown بإضافة ‎.md إلى رابطها.

جرّبه على شبكتك.

50 مشترك لمدة 7 أيام، من غير ما تدفع حاجة.