public-data-docs

Table: BALANCE_UPDATES

Description: The balance_updates table tracks all changes made to customer or system balances. These updates can be triggered by various transactions such as bookings, rentals, invoices, or voucher applications. Each record represents a discrete event that affects a balance and helps in maintaining an audit trail of financial movements.

🔑 Primary Key

id

Field Name Data Type Description
id NUMBER Unique identifier for the balance update record.
balance_id NUMBER ID of the balance affected by this update.
rental_id NUMBER Rental ID associated with the update, if applicable.
booking_id NUMBER Booking ID related to the transaction, if relevant.
voucher_id NUMBER Voucher ID involved in the transaction, if applicable.
invoice_id NUMBER Invoice ID linked to the balance update, if applicable.
type NUMBER Code representing the type of update (0 => SIGNUP, 1 => PACKAGE, 2 => REFERRAL, 3 => PROMOTION, 4 => CREDIT, 5 => RENTAL, 6 => SETTLEMENT, 7 => TOP_UP, 8 => CORRECTION, 9 => BOOKING_CANCELLATION, 10 => BOOKING_EXPIRED, 11 => INVALID, 12 => SINGLE_USE_VOUCHER, 13 => SUBSCRIPTION, 14 => REWARD, 15 => COLLECTION_INVOICE, 16 => REFUND).
type_name TEXT String label for type.
amount NUMBER Value of the update (positive for credits, negative for debits).
ext_payment_ref TEXT External payment processor reference.
balance_value NUMBER The resulting balance after this update was applied.
created_at TIMESTAMP_TZ Time at which the update was created.
_snowflake_inserted_at TIMESTAMP_NTZ System timestamp when the record was inserted into Snowflake.
_snowflake_updated_at TIMESTAMP_NTZ System timestamp when the record was last updated in Snowflake.
_snowflake_deleted BOOLEAN True if the record was deleted in the source.