الانتقال إلى المحتوى الرئيسي
GET
/
workspaces
/
{workspaceId}
/
billing-accounts
/
{billingAccountId}
/
invoices
عرض قائمة الفواتير
curl --request GET \
  --url https://api.altostrat.io/workspaces/{workspaceId}/billing-accounts/{billingAccountId}/invoices \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "in_1Kb...",
      "customer_id": "cus_...",
      "status": "paid",
      "amount_due": 999,
      "amount_paid": 999,
      "currency": "usd",
      "created_at": "2025-10-29T00:40:06.000000Z",
      "subtotal": 1099,
      "total": 999,
      "tax": 0,
      "discount_amount": 100,
      "discount_names": [
        "10% Off Coupon"
      ],
      "lines": [
        {
          "id": "il_1Kb...",
          "description": "10 × Locations",
          "amount": 1000,
          "currency": "usd",
          "quantity": 10,
          "price_id": "price_...",
          "unit_amount": 100,
          "product_name": "Locations"
        }
      ],
      "due_date": null,
      "hosted_invoice_url": "https://invoice.stripe.com/...",
      "invoice_pdf": "https://pay.stripe.com/...",
      "number": "AB123-001"
    }
  ],
  "has_more": true,
  "next_cursor": "<string>",
  "previous_cursor": "<string>"
}

Authorizations

Authorization
string
header
required

أدخل JWT الخاص بك بالتنسيق: Bearer {token}

Path Parameters

workspaceId
string
required

معرّف مساحة العمل.

Example:

"ws_a1b2c3d4e5f6g7h8"

billingAccountId
string
required

معرّف حساب الفوترة، والذي يتوافق مع معرّف عميل Stripe (cus_...).

Example:

"cus_a1b2c3d4e5f6g7h8"

Query Parameters

limit
integer
default:100

حد لعدد الكائنات التي سيتم إرجاعها. يمكن أن يتراوح الحد بين 1 و 200، والقيمة الافتراضية هي 100.

after
string

مؤشر للاستخدام في ترقيم الصفحات. after هو معرّف كائن يحدد مكانك في القائمة. على سبيل المثال، إذا قمت بطلب قائمة واستلمت 100 كائن، تنتهي بـ inv_...، يمكن أن يتضمن استدعاؤك اللاحق after=inv_... لجلب الصفحة التالية من القائمة.

before
string

مؤشر للاستخدام في ترقيم الصفحات. before هو معرّف كائن يحدد مكانك في القائمة. على سبيل المثال، إذا قمت بطلب قائمة واستلمت 100 كائن، تبدأ بـ inv_...، يمكن أن يتضمن استدعاؤك اللاحق before=inv_... لجلب الصفحة السابقة من القائمة.

Response

قائمة بكائنات الفواتير.

data
object[]
has_more
boolean
next_cursor
string | null
previous_cursor
string | null