الانتقال إلى المحتوى الرئيسي
POST
/
workspaces
/
{workspaceId}
/
billing-accounts
إنشاء حساب فوترة
curl --request POST \
  --url https://api.altostrat.io/workspaces/{workspaceId}/billing-accounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "ACME Corp (EU)",
  "email": "billing-eu@acme.com",
  "phone": "+442071234567",
  "description": "For all European operations.",
  "currency": "eur",
  "address": {
    "country": "US",
    "line1": "123 Main Street",
    "line2": "Suite 456",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94105"
  }
}'
{
  "id": "cus_a1b2c3d4e5f6g7h8",
  "workspace_id": "ws_a1b2c3d4e5f6g7h8",
  "name": "ACME Corp Billing",
  "email": "billing@acme.com",
  "phone": "+15551234567",
  "description": "For US-based operations",
  "currency": "usd",
  "address": {
    "country": "US",
    "line1": "123 Main Street",
    "line2": "Suite 456",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94105"
  },
  "created_at": "2025-10-29T00:40:06.000000Z",
  "updated_at": "2025-10-29T00:40:06.000000Z"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

workspaceId
string
required

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

Example:

"ws_a1b2c3d4e5f6g7h8"

Body

application/json
name
string
required

اسم حساب الفوترة الجديد. 100 حرف كحد أقصى.

Example:

"ACME Corp (EU)"

email
string<email>
required

عنوان البريد الإلكتروني الرئيسي للفوترة. 150 حرفًا كحد أقصى.

Example:

"billing-eu@acme.com"

phone
string | null

رقم هاتف جهة اتصال الفوترة. 50 حرفًا كحد أقصى.

Example:

"+442071234567"

description
string | null

وصف اختياري لحساب الفوترة. 200 حرف كحد أقصى.

Example:

"For all European operations."

currency
enum<string>

رمز العملة ISO المكون من ثلاثة أحرف. إذا لم يتم توفيره، سيتم تحديده افتراضيًا بناءً على إعدادات مساحة العمل أو النظام.

الخيارات المتاحة:
usd,
zar,
eur,
gbp,
aud
Example:

"eur"

address
object

Response

تم إنشاء حساب الفوترة بنجاح.

id
string

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

Example:

"cus_a1b2c3d4e5f6g7h8"

workspace_id
string

معرّف مساحة العمل التي ينتمي إليها حساب الفوترة هذا.

Example:

"ws_a1b2c3d4e5f6g7h8"

name
string

اسم حساب الفوترة.

Example:

"ACME Corp Billing"

email
string<email>

عنوان البريد الإلكتروني الرئيسي للفوترة.

Example:

"billing@acme.com"

phone
string | null

رقم هاتف جهة اتصال الفوترة.

Example:

"+15551234567"

description
string | null

وصف اختياري لحساب الفوترة.

Example:

"For US-based operations"

currency
enum<string>

رمز العملة ISO المكون من ثلاثة أحرف لحساب الفوترة.

الخيارات المتاحة:
usd,
zar,
eur,
gbp,
aud
Example:

"usd"

address
object
created_at
string<date-time>

الطابع الزمني لإنشاء حساب الفوترة.

Example:

"2025-10-29T00:40:06.000000Z"

updated_at
string<date-time>

الطابع الزمني لآخر تحديث لحساب الفوترة.

Example:

"2025-10-29T00:40:06.000000Z"