billing
billing
Type Aliases
AITokenUsageType
type AITokenUsageType = "input" | "cached_input" | "output";Defined in: billing/index.ts:13
BillingCatalogue
type BillingCatalogue = object;Defined in: billing/index.ts:117
Properties
| Property | Type | Defined in |
|---|---|---|
currency |
typeof BILLING_CURRENCY |
billing/index.ts:118 |
products |
readonly BillingCatalogueProduct[] |
billing/index.ts:119 |
BillingCatalogueInterval
type BillingCatalogueInterval = "month" | "year";Defined in: billing/index.ts:11
BillingCataloguePlan
type BillingCataloguePlan = object;Defined in: billing/index.ts:102
Properties
| Property | Type | Defined in |
|---|---|---|
allowPromotionCodes |
boolean |
billing/index.ts:105 |
id |
string |
billing/index.ts:103 |
seatPriceId |
BillingCataloguePrice["id"] |
billing/index.ts:106 |
trialDays |
number |
billing/index.ts:104 |
BillingCataloguePrice
type BillingCataloguePrice = object;Defined in: billing/index.ts:86
Properties
| Property | Type | Defined in |
|---|---|---|
amount? |
string |
billing/index.ts:94 |
checkout |
boolean |
billing/index.ts:92 |
description |
string |
billing/index.ts:89 |
dimensions? |
Readonly<Record<string, string>> |
billing/index.ts:97 |
id |
string |
billing/index.ts:87 |
interval |
BillingCatalogueInterval |
billing/index.ts:91 |
meterId? |
string |
billing/index.ts:96 |
model |
BillingCataloguePriceModel |
billing/index.ts:90 |
name |
string |
billing/index.ts:88 |
stripePriceIds |
BillingCatalogueProviderPriceIds |
billing/index.ts:93 |
tiers? |
readonly BillingCatalogueTier[] |
billing/index.ts:99 |
tiersMode? |
"graduated" | "volume" |
billing/index.ts:98 |
unitAmountDecimal? |
string |
billing/index.ts:95 |
BillingCataloguePriceModel
type BillingCataloguePriceModel = "flat" | "per_seat" | "metered";Defined in: billing/index.ts:12
BillingCatalogueProduct
type BillingCatalogueProduct = object;Defined in: billing/index.ts:109
Properties
| Property | Type | Defined in |
|---|---|---|
description |
string |
billing/index.ts:112 |
id |
string |
billing/index.ts:110 |
name |
string |
billing/index.ts:111 |
plans |
readonly BillingCataloguePlan[] |
billing/index.ts:114 |
prices |
readonly BillingCataloguePrice[] |
billing/index.ts:113 |
BillingCatalogueProviderPriceIds
type BillingCatalogueProviderPriceIds = object;Defined in: billing/index.ts:81
Properties
| Property | Type | Defined in |
|---|---|---|
production |
string | null |
billing/index.ts:83 |
sandbox |
string | null |
billing/index.ts:82 |
BillingCatalogueTier
type BillingCatalogueTier = object;Defined in: billing/index.ts:74
Properties
| Property | Type | Defined in |
|---|---|---|
amount |
string |
billing/index.ts:76 |
upTo |
number | "inf" |
billing/index.ts:75 |
BillingProviderEnvironment
type BillingProviderEnvironment = "sandbox" | "production";Defined in: billing/index.ts:79
PricingCatalogEntry
type PricingCatalogEntry = object;Defined in: billing/pricing-catalog.ts:3
Properties
| Property | Type | Defined in |
|---|---|---|
billingCadence |
"month" | "year" |
billing/pricing-catalog.ts:7 |
detail |
string |
billing/pricing-catalog.ts:9 |
icon |
string |
billing/pricing-catalog.ts:11 |
planId |
SelfServePlanId |
billing/pricing-catalog.ts:4 |
priceLine |
string |
billing/pricing-catalog.ts:8 |
pricePerSeat |
number |
billing/pricing-catalog.ts:6 |
savingsLine? |
string |
billing/pricing-catalog.ts:10 |
title |
string |
billing/pricing-catalog.ts:5 |
SelfServePlanId
type SelfServePlanId = "platform" | "platform-annual";Defined in: billing/pricing-catalog.ts:1
Variables
AI_METERED_PRICES
const AI_METERED_PRICES: readonly [{
checkout: true;
description: `Billed monthly at ${string} for Gemini 3.1 Pro input tokens.`;
id: "llm-gemini-3_1-pro-input-monthly";
interval: "month";
meterId: "llm_usage_input";
model: "metered";
name: "Gemini 3.1 Pro input tokens";
stripePriceIds: {
production: "price_1TEwLCLlQVSVzCBMjKkXKeLJ";
sandbox: "price_1TEwCsLvWjJB44nU1zpgWbZb";
};
unitAmountDecimal: string;
}, {
checkout: true;
description: `Billed monthly at ${string} for Gemini 3.1 Pro cached input tokens.`;
id: "llm-gemini-3_1-pro-cached-input-monthly";
interval: "month";
meterId: "llm_usage_cached_input";
model: "metered";
name: "Gemini 3.1 Pro cached input tokens";
stripePriceIds: {
production: "price_1TEwLCLlQVSVzCBMefV6cFks";
sandbox: "price_1TEwCsLvWjJB44nUnViD27Lq";
};
unitAmountDecimal: string;
}, {
checkout: true;
description: `Billed monthly at ${string} for Gemini 3.1 Pro output tokens, including reasoning tokens.`;
id: "llm-gemini-3_1-pro-output-monthly";
interval: "month";
meterId: "llm_usage_output";
model: "metered";
name: "Gemini 3.1 Pro output tokens";
stripePriceIds: {
production: "price_1TEwLBLlQVSVzCBM5mS9i9SR";
sandbox: "price_1TEwCtLvWjJB44nU24AZrBX7";
};
unitAmountDecimal: string;
}];Defined in: billing/index.ts:138
AI_MODEL_SGD_PER_MILLION_TOKEN_RATES
const AI_MODEL_SGD_PER_MILLION_TOKEN_RATES: object;Defined in: billing/index.ts:38
Type Declaration
gemini-3.1-pro-preview
readonly gemini-3.1-pro-preview: object;gemini-3.1-pro-preview.cached_input
readonly cached_input: number;gemini-3.1-pro-preview.input
readonly input: number;gemini-3.1-pro-preview.output
readonly output: number;
gemini-3.5-flash
readonly gemini-3.5-flash: object;gemini-3.5-flash.cached_input
readonly cached_input: number;gemini-3.5-flash.input
readonly input: number;gemini-3.5-flash.output
readonly output: number;AI_USAGE_DIMENSION_KEYS
const AI_USAGE_DIMENSION_KEYS: object;Defined in: billing/index.ts:6
Type Declaration
model
readonly model: "model" = 'model';
type
readonly type: "type" = 'type';AI_USAGE_METER_IDS
const AI_USAGE_METER_IDS: object;Defined in: billing/index.ts:15
Type Declaration
cached_input
readonly cached_input: "llm_usage_cached_input" = 'llm_usage_cached_input';
input
readonly input: "llm_usage_input" = 'llm_usage_input';
output
readonly output: "llm_usage_output" = 'llm_usage_output';AI_USAGE_PRODUCT_ID
const AI_USAGE_PRODUCT_ID: "llm_usage" = 'llm_usage';Defined in: billing/index.ts:4
BILLING_CURRENCY
const BILLING_CURRENCY: "SGD";Defined in: billing/index.ts:1
CURRENCY_MINOR_UNITS_PER_MAJOR_UNIT
const CURRENCY_MINOR_UNITS_PER_MAJOR_UNIT: 100 = 100;Defined in: billing/index.ts:3
DEFAULT_BILLING_TRIAL_DAYS
const DEFAULT_BILLING_TRIAL_DAYS: 30 = 30;Defined in: billing/index.ts:2
DEFAULT_PLAN_ID
const DEFAULT_PLAN_ID: SelfServePlanId = 'platform';Defined in: billing/pricing-catalog.ts:46
LATEST_CATALOGUE
const LATEST_CATALOGUE: object;Defined in: billing/index.ts:286
Type Declaration
currency
readonly currency: "SGD" = BILLING_CURRENCY;
products
readonly products: readonly [{
description: "License fees for Norbital Business seats.";
id: "platform-license";
name: "Norbital Business license";
plans: readonly [{
allowPromotionCodes: true;
id: "platform";
seatPriceId: "platform-seat-monthly";
trialDays: 30;
}, {
allowPromotionCodes: true;
id: "platform-annual";
seatPriceId: "platform-seat-annual";
trialDays: 30;
}];
prices: readonly [{
amount: "6000";
checkout: true;
description: "License fee charged monthly at SGD 60.00 per seat after the free trial.";
id: "platform-seat-monthly";
interval: "month";
model: "per_seat";
name: "Business seat (Monthly)";
stripePriceIds: {
production: "price_1TEwLRLlQVSVzCBMfyK1sP4m";
sandbox: "price_1TEwCqLvWjJB44nUheT1vkRb";
};
}, {
amount: "60000";
checkout: true;
description: "License fee charged yearly at SGD 600.00 per seat after the free trial (SGD 50.00 per seat per month equivalent).";
id: "platform-seat-annual";
interval: "year";
model: "per_seat";
name: "Business seat (Yearly)";
stripePriceIds: {
production: "price_1TEwLRLlQVSVzCBM09QGW3Da";
sandbox: "price_1TEwCrLvWjJB44nUismARbsI";
};
}];
}, {
description: "Metered cloud storage usage charges.";
id: "platform-storage";
name: "Cloud storage usage";
plans: readonly [];
prices: readonly [{
checkout: true;
description: "Billed monthly based on storage usage. The first 10 GB is included, then SGD 0.50 per GB.";
id: "platform-storage-gb-monthly";
interval: "month";
meterId: "storage_gb";
model: "metered";
name: "Cloud storage usage";
stripePriceIds: {
production: "price_1TEwLJLlQVSVzCBMKdBoPmRF";
sandbox: "price_1TEwCrLvWjJB44nUqLLFU3Lr";
};
tiers: readonly [{
amount: "0";
upTo: 10;
}, {
amount: "50";
upTo: "inf";
}];
tiersMode: "graduated";
}];
}, {
description: "Metered usage charges for Gemini generation and embedding workloads.";
id: "llm_usage";
name: "llm_usage";
plans: readonly [];
prices: readonly [{
checkout: true;
description: `Billed monthly at ${string} for Gemini 3.1 Pro input tokens.`;
id: "llm-gemini-3_1-pro-input-monthly";
interval: "month";
meterId: "llm_usage_input";
model: "metered";
name: "Gemini 3.1 Pro input tokens";
stripePriceIds: {
production: "price_1TEwLCLlQVSVzCBMjKkXKeLJ";
sandbox: "price_1TEwCsLvWjJB44nU1zpgWbZb";
};
unitAmountDecimal: string;
}, {
checkout: true;
description: `Billed monthly at ${string} for Gemini 3.1 Pro cached input tokens.`;
id: "llm-gemini-3_1-pro-cached-input-monthly";
interval: "month";
meterId: "llm_usage_cached_input";
model: "metered";
name: "Gemini 3.1 Pro cached input tokens";
stripePriceIds: {
production: "price_1TEwLCLlQVSVzCBMefV6cFks";
sandbox: "price_1TEwCsLvWjJB44nUnViD27Lq";
};
unitAmountDecimal: string;
}, {
checkout: true;
description: `Billed monthly at ${string} for Gemini 3.1 Pro output tokens, including reasoning tokens.`;
id: "llm-gemini-3_1-pro-output-monthly";
interval: "month";
meterId: "llm_usage_output";
model: "metered";
name: "Gemini 3.1 Pro output tokens";
stripePriceIds: {
production: "price_1TEwLBLlQVSVzCBM5mS9i9SR";
sandbox: "price_1TEwCtLvWjJB44nU24AZrBX7";
};
unitAmountDecimal: string;
}];
}] = LATEST_CATALOGUE_PRODUCTS;LATEST_CATALOGUE_PLANS
const LATEST_CATALOGUE_PLANS: readonly [{
allowPromotionCodes: true;
id: "platform";
seatPriceId: "platform-seat-monthly";
trialDays: 30;
}, {
allowPromotionCodes: true;
id: "platform-annual";
seatPriceId: "platform-seat-annual";
trialDays: 30;
}];Defined in: billing/index.ts:280
LATEST_CATALOGUE_PRICES
const LATEST_CATALOGUE_PRICES: readonly [{
amount: "6000";
checkout: true;
description: "License fee charged monthly at SGD 60.00 per seat after the free trial.";
id: "platform-seat-monthly";
interval: "month";
model: "per_seat";
name: "Business seat (Monthly)";
stripePriceIds: {
production: "price_1TEwLRLlQVSVzCBMfyK1sP4m";
sandbox: "price_1TEwCqLvWjJB44nUheT1vkRb";
};
}, {
amount: "60000";
checkout: true;
description: "License fee charged yearly at SGD 600.00 per seat after the free trial (SGD 50.00 per seat per month equivalent).";
id: "platform-seat-annual";
interval: "year";
model: "per_seat";
name: "Business seat (Yearly)";
stripePriceIds: {
production: "price_1TEwLRLlQVSVzCBM09QGW3Da";
sandbox: "price_1TEwCrLvWjJB44nUismARbsI";
};
}, {
checkout: true;
description: "Billed monthly based on storage usage. The first 10 GB is included, then SGD 0.50 per GB.";
id: "platform-storage-gb-monthly";
interval: "month";
meterId: "storage_gb";
model: "metered";
name: "Cloud storage usage";
stripePriceIds: {
production: "price_1TEwLJLlQVSVzCBMKdBoPmRF";
sandbox: "price_1TEwCrLvWjJB44nUqLLFU3Lr";
};
tiers: readonly [{
amount: "0";
upTo: 10;
}, {
amount: "50";
upTo: "inf";
}];
tiersMode: "graduated";
}, {
checkout: true;
description: `Billed monthly at ${string} for Gemini 3.1 Pro input tokens.`;
id: "llm-gemini-3_1-pro-input-monthly";
interval: "month";
meterId: "llm_usage_input";
model: "metered";
name: "Gemini 3.1 Pro input tokens";
stripePriceIds: {
production: "price_1TEwLCLlQVSVzCBMjKkXKeLJ";
sandbox: "price_1TEwCsLvWjJB44nU1zpgWbZb";
};
unitAmountDecimal: string;
}, {
checkout: true;
description: `Billed monthly at ${string} for Gemini 3.1 Pro cached input tokens.`;
id: "llm-gemini-3_1-pro-cached-input-monthly";
interval: "month";
meterId: "llm_usage_cached_input";
model: "metered";
name: "Gemini 3.1 Pro cached input tokens";
stripePriceIds: {
production: "price_1TEwLCLlQVSVzCBMefV6cFks";
sandbox: "price_1TEwCsLvWjJB44nUnViD27Lq";
};
unitAmountDecimal: string;
}, {
checkout: true;
description: `Billed monthly at ${string} for Gemini 3.1 Pro output tokens, including reasoning tokens.`;
id: "llm-gemini-3_1-pro-output-monthly";
interval: "month";
meterId: "llm_usage_output";
model: "metered";
name: "Gemini 3.1 Pro output tokens";
stripePriceIds: {
production: "price_1TEwLBLlQVSVzCBM5mS9i9SR";
sandbox: "price_1TEwCtLvWjJB44nU24AZrBX7";
};
unitAmountDecimal: string;
}];Defined in: billing/index.ts:274
LATEST_CATALOGUE_PRODUCTS
const LATEST_CATALOGUE_PRODUCTS: readonly [{
description: "License fees for Norbital Business seats.";
id: "platform-license";
name: "Norbital Business license";
plans: readonly [{
allowPromotionCodes: true;
id: "platform";
seatPriceId: "platform-seat-monthly";
trialDays: 30;
}, {
allowPromotionCodes: true;
id: "platform-annual";
seatPriceId: "platform-seat-annual";
trialDays: 30;
}];
prices: readonly [{
amount: "6000";
checkout: true;
description: "License fee charged monthly at SGD 60.00 per seat after the free trial.";
id: "platform-seat-monthly";
interval: "month";
model: "per_seat";
name: "Business seat (Monthly)";
stripePriceIds: {
production: "price_1TEwLRLlQVSVzCBMfyK1sP4m";
sandbox: "price_1TEwCqLvWjJB44nUheT1vkRb";
};
}, {
amount: "60000";
checkout: true;
description: "License fee charged yearly at SGD 600.00 per seat after the free trial (SGD 50.00 per seat per month equivalent).";
id: "platform-seat-annual";
interval: "year";
model: "per_seat";
name: "Business seat (Yearly)";
stripePriceIds: {
production: "price_1TEwLRLlQVSVzCBM09QGW3Da";
sandbox: "price_1TEwCrLvWjJB44nUismARbsI";
};
}];
}, {
description: "Metered cloud storage usage charges.";
id: "platform-storage";
name: "Cloud storage usage";
plans: readonly [];
prices: readonly [{
checkout: true;
description: "Billed monthly based on storage usage. The first 10 GB is included, then SGD 0.50 per GB.";
id: "platform-storage-gb-monthly";
interval: "month";
meterId: "storage_gb";
model: "metered";
name: "Cloud storage usage";
stripePriceIds: {
production: "price_1TEwLJLlQVSVzCBMKdBoPmRF";
sandbox: "price_1TEwCrLvWjJB44nUqLLFU3Lr";
};
tiers: readonly [{
amount: "0";
upTo: 10;
}, {
amount: "50";
upTo: "inf";
}];
tiersMode: "graduated";
}];
}, {
description: "Metered usage charges for Gemini generation and embedding workloads.";
id: "llm_usage";
name: "llm_usage";
plans: readonly [];
prices: readonly [{
checkout: true;
description: `Billed monthly at ${string} for Gemini 3.1 Pro input tokens.`;
id: "llm-gemini-3_1-pro-input-monthly";
interval: "month";
meterId: "llm_usage_input";
model: "metered";
name: "Gemini 3.1 Pro input tokens";
stripePriceIds: {
production: "price_1TEwLCLlQVSVzCBMjKkXKeLJ";
sandbox: "price_1TEwCsLvWjJB44nU1zpgWbZb";
};
unitAmountDecimal: string;
}, {
checkout: true;
description: `Billed monthly at ${string} for Gemini 3.1 Pro cached input tokens.`;
id: "llm-gemini-3_1-pro-cached-input-monthly";
interval: "month";
meterId: "llm_usage_cached_input";
model: "metered";
name: "Gemini 3.1 Pro cached input tokens";
stripePriceIds: {
production: "price_1TEwLCLlQVSVzCBMefV6cFks";
sandbox: "price_1TEwCsLvWjJB44nUnViD27Lq";
};
unitAmountDecimal: string;
}, {
checkout: true;
description: `Billed monthly at ${string} for Gemini 3.1 Pro output tokens, including reasoning tokens.`;
id: "llm-gemini-3_1-pro-output-monthly";
interval: "month";
meterId: "llm_usage_output";
model: "metered";
name: "Gemini 3.1 Pro output tokens";
stripePriceIds: {
production: "price_1TEwLBLlQVSVzCBM5mS9i9SR";
sandbox: "price_1TEwCtLvWjJB44nU24AZrBX7";
};
unitAmountDecimal: string;
}];
}];Defined in: billing/index.ts:189
PRICING_CATALOG
const PRICING_CATALOG: Record<SelfServePlanId, PricingCatalogEntry>;Defined in: billing/pricing-catalog.ts:22
PRICING_CATALOG_LIST
const PRICING_CATALOG_LIST: PricingCatalogEntry[];Defined in: billing/pricing-catalog.ts:44
Functions
formatBillingAmountFromMinorUnits()
function formatBillingAmountFromMinorUnits(amountMinorUnits, options?): string;Defined in: billing/index.ts:122
Parameters
| Parameter | Type |
|---|---|
amountMinorUnits |
string | number |
options? |
{ maximumFractionDigits?: number; minimumFractionDigits?: number; } |
options.maximumFractionDigits? |
number |
options.minimumFractionDigits? |
number |
Returns
string