# Customer Balance Transaction (/en/api-reference/objects/customer-balance-transaction)

A Customer Balance Transaction is one change to a customer's balance. The balance always equals the sum of its transactions. A negative balance is credit, used up by the customer's next invoice.

## Fields

- `id` (string, required) — Transaction ID
- `object` (enum("customer_balance_transaction"), required) — Object type
- `type` (enum("adjustment" | "applied_to_invoice" | "unapplied_from_invoice" | "credit_note" | "invoice_overpaid"), required) — What changed the balance
- `amount` (integer, required) — Change in minor units. Negative adds credit; positive uses credit or adds a debt.
- `endingBalance` (integer, required) — Customer balance after this change
- `currency` (enum("EGP" | "USD" | "EUR" | "GBP" | "SAR" | "AED" | "QAR" | "KWD" | "JOD" | "OMR" | "BHD" | "LYD" | "AUD" | "CAD" | "CNY"), required) — Currency of the balance
- `invoiceId` (string | null, required) — Invoice the credit was used on or returned from
- `creditNoteId` (string | null, required) — Credit note that gave the credit
- `description` (string | null, required) — Note entered with a manual adjustment
- `customerId` (string, required) — Customer ID
- `merchantId` (string, required) — Merchant ID
- `createdAt` (string, required) — Created timestamp (ISO 8601)