Langsung ke konten utama
POST
/
workspaces
/
{workspaceId}
/
billing-accounts
Buat akun penagihan
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": "Untuk semua operasi Eropa.",
  "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": "Penagihan ACME Corp",
  "email": "billing@acme.com",
  "phone": "+15551234567",
  "description": "Untuk operasi yang berbasis di AS",
  "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

Masukkan JWT Anda dalam format: Bearer {token}

Path Parameters

workspaceId
string
required

ID dari workspace.

Example:

"ws_a1b2c3d4e5f6g7h8"

Body

application/json
name
string
required

Nama untuk akun penagihan baru. Maksimal 100 karakter.

Example:

"ACME Corp (EU)"

email
string<email>
required

Alamat email penagihan utama. Maksimal 150 karakter.

Example:

"billing-eu@acme.com"

phone
string | null

Nomor telepon kontak penagihan. Maksimal 50 karakter.

Example:

"+442071234567"

description
string | null

Deskripsi opsional untuk akun penagihan. Maksimal 200 karakter.

Example:

"Untuk semua operasi Eropa."

currency
enum<string>

Kode mata uang ISO tiga huruf. Jika tidak disediakan, akan default berdasarkan pengaturan workspace atau sistem.

Opsi yang tersedia:
usd,
zar,
eur,
gbp,
aud
Example:

"eur"

address
object

Response

Akun penagihan berhasil dibuat.

id
string

Pengidentifikasi unik untuk akun penagihan (ID Pelanggan Stripe), diawali dengan cus_.

Example:

"cus_a1b2c3d4e5f6g7h8"

workspace_id
string

ID dari workspace tempat akun penagihan ini berada.

Example:

"ws_a1b2c3d4e5f6g7h8"

name
string

Nama dari akun penagihan.

Example:

"Penagihan ACME Corp"

email
string<email>

Alamat email penagihan utama.

Example:

"billing@acme.com"

phone
string | null

Nomor telepon kontak penagihan.

Example:

"+15551234567"

description
string | null

Deskripsi opsional untuk akun penagihan.

Example:

"Untuk operasi yang berbasis di AS"

currency
enum<string>

Kode mata uang ISO tiga huruf untuk akun penagihan.

Opsi yang tersedia:
usd,
zar,
eur,
gbp,
aud
Example:

"usd"

address
object
created_at
string<date-time>

Stempel waktu saat akun penagihan dibuat.

Example:

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

updated_at
string<date-time>

Stempel waktu saat akun penagihan terakhir diperbarui.

Example:

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