Type Alias BillingActivityItem
BillingActivityItem:
| {
attribution: "wallet"
| "entitlement";
balanceAfterCents: number;
billedQuantity: number;
callId: string | null;
fareName: string;
messageId: string | null;
number: string | null;
occurredAt: string;
phoneNumberId: string;
totalCents: number;
type: "usage";
}
| {
amountCents: number;
balanceAfterCents: number;
invoiceId: string
| null;
kind: "card" | "welcome" | "manual";
occurredAt: string;
type: "credit";
}
| {
amountCents: number;
balanceAfterCents: number;
invoiceId: string;
occurredAt: string;
reason: string;
type: "payment";
}
Type Declaration
- {
attribution: "wallet" | "entitlement";
balanceAfterCents: number;
billedQuantity: number;
callId: string | null;
fareName: string;
messageId: string | null;
number: string | null;
occurredAt: string;
phoneNumberId: string;
totalCents: number;
type: "usage";
}
-
attribution: "wallet" | "entitlement"
-
balanceAfterCents: number
-
billedQuantity: number
-
callId: string | null
-
fareName: string
-
messageId: string | null
-
number: string | null
-
occurredAt: string
-
phoneNumberId: string
-
totalCents: number
-
type: "usage"
- {
amountCents: number;
balanceAfterCents: number;
invoiceId: string | null;
kind: "card" | "welcome" | "manual";
occurredAt: string;
type: "credit";
}
- {
amountCents: number;
balanceAfterCents: number;
invoiceId: string;
occurredAt: string;
reason: string;
type: "payment";
}
One activity item, discriminated by
type:usage— a call/SMS/number-ownership charge.credit— a wallet credit (top-up / welcome / manual grant).payment— a subscription invoice (initial / renewal / proration).Every item carries
balanceAfterCents: the credit-wallet balance in USD cents immediately after this row — a running balance (the newest item equals the current wallet balance). Rows that don't move the wallet (payment, subscription-coveredusage) carry the balance as of their moment.