الانتقال إلى المحتوى الرئيسي
PATCH
/
workspaces
/
{workspaceId}
/
billing-accounts
/
{billingAccountId}
تحديث حساب فوترة
curl --request PATCH \
  --url https://api.altostrat.io/workspaces/{workspaceId}/billing-accounts/{billingAccountId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "ACME Corp (International)",
  "email": "global.billing@acme.com",
  "phone": "+15559876543",
  "description": "Primary account for all international billing.",
  "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"

billingAccountId
string
required

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

Example:

"cus_a1b2c3d4e5f6g7h8"

Body

application/json
name
string

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

Example:

"ACME Corp (International)"

email
string<email>

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

Example:

"global.billing@acme.com"

phone
string | null

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

Example:

"+15559876543"

description
string | null

وصف محدّث لحساب الفوترة.

Example:

"Primary account for all international billing."

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"