Documentation Index
Fetch the complete documentation index at: https://docs.billingos.dev/llms.txt
Use this file to discover all available pages before exploring further.
createCustomer
const customer = await billing.createCustomer({
externalUserId: "user_123",
email: "jane@example.com",
name: "Jane Smith",
metadata: { company: "Acme Inc" },
});
Parameters
| Name | Type | Required | Description |
|---|
externalUserId | string | Yes | Your user’s unique ID |
externalOrganizationId | string | No | Organization ID for B2B |
email | string | No | Customer email |
name | string | No | Customer name |
metadata | Record<string, any> | No | Custom key-value pairs |
getCustomer
const customer = await billing.getCustomer("cus_123");
getCustomerByExternalId
Look up a customer by their ID in your system.
const customer = await billing.getCustomerByExternalId("user_123");
updateCustomer
const updated = await billing.updateCustomer("cus_123", {
name: "Jane Doe",
metadata: { company: "Acme Inc" },
});
deleteCustomer
await billing.deleteCustomer("cus_123");
Customer object
interface Customer {
id: string
externalUserId: string
externalOrganizationId?: string
email?: string
name?: string
stripeCustomerId?: string
metadata?: Record<string, any>
createdAt: Date
updatedAt: Date
}