Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| payment_id | varchar | 32 | null |
|
|
Surrogate primary key for this payment record. Derived from payment_internal_id and is_reversed. |
|||||
| payment_internal_id | int8 | 19 | √ | null |
|
|
The booking entry ID in the financial ledger. A single payment_internal_id may appear in multiple rows when the payment maps to different transaction contexts. |
||||
| customer_id | int8 | 19 | √ | null |
|
|
The customer associated with this payment. Available for most payment types where the customer is known. NULL for anonymous POS sales and some imported records. |
||||
| organization_unit_id | int8 | 19 | √ | null |
|
|
The studio (gym) that owns this payment entry. Always populated. |
||||
| company_id | int8 | 19 | √ | null |
|
|
The corporate (B2B) company associated with this payment, if any. NULL for individual (B2C) customers. |
||||
| booking_date | date | 13 | √ | null |
|
|
The accounting date of this payment. This is the authoritative date used for financial reporting. Always populated. |
||||
| booking_number | varchar | 255 | √ | null |
|
|
Human-readable booking reference number from the financial ledger entry (e.g., 5000–0008-0000001). NULL for some payment types. |
||||
| payment_amount | numeric | 19,2 | √ | null |
|
|
The gross amount of this payment as recorded in the financial ledger. Positive for incoming payments; negative for reversals and chargebacks. |
||||
| unallocated_amount | numeric | 19,2 | √ | null |
|
|
The portion of this payment’s credit not yet linked to any debt claim. Zero means the payment is fully matched to revenue. NULL for reversal and chargeback rows. |
||||
| currency_id | varchar | 3 | √ | null |
|
|
ISO 4217 currency code for the payment amount (e.g., EUR, CHF, GBP). |
||||
| is_reversed | bool | 1 | √ | null |
|
|
True if this payment has been reversed by a subsequent entry. Allows filtering out reversed payments without anti-joining against chargeback or reversal rows. |
||||
| charged_back_reason | varchar | 65535 | √ | null |
|
|
Free-text bank return reason recorded when a payment is charged back. Populated only for chargeback rows (PAYMENT_RUN_ITEM_CHARGED_BACK, FINION_PAY_CHARGED_BACK). NULL otherwise. |
||||
| modification_reason | varchar | 65535 | √ | null |
|
|
Reason text recorded when a payment entry was modified (e.g., manual corrections or adjustments by studio staff). NULL for unmodified entries. |
||||
| custom_description | varchar | 65535 | √ | null |
|
|
Free-text description attached to the payment entry by the studio (e.g., notes about the payment purpose or context). NULL when not provided. |
||||
| provider_transaction_id | varchar | 65535 | √ | null |
|
|
The transaction reference ID(s) assigned by the payment provider, aggregated per payment. Multiple transaction IDs for the same payment context are concatenated. NULL when no provider reference is available. |
||||
| payment_provider | varchar | 255 | √ | null |
|
|
The payment provider that processed this transaction. For payment-run entries and their chargebacks: determined by the payment run’s configured provider (e.g., FinionPay, FinionCapital, XML, Booking). For all other booking entry types: determined by the entry’s channel (e.g., Bank, Cash, FinionPAY, Debt Collection Agency, Universal). NULL when no provider could be resolved. |
||||
| payment_type | varchar | 255 | √ | null |
|
|
The payment type classification. For payment-run entries and their chargebacks: determined by the payment run’s configured provider (e.g., SEPA, Credit Card, LSV, TWINT, BACS). For all other booking entry types: determined by the entry’s channel (e.g., Transfer, Cash, Terminal Payment, Chargeback, Payout). NULL when no type could be resolved. |
||||
| payment_brand | varchar | 255 | √ | null |
|
|
The card scheme or payment brand as reported by the payment provider (e.g., mc for Mastercard, visa, IDEAL). Populated for third-party online payments where the provider reports a card brand. NULL for cash, bank transfer, payment run items, and other non-card channels. |
||||
| transaction_source | varchar | 255 | √ | null |
|
|
Identifies the channel or mechanism through which the transaction was processed (e.g., Payment Run, Payment Run Chargeback, Online Payment, POS, POS Debt Claim Payment). Multiple sources for the same payment are comma-separated. NULL when no transaction source could be resolved. |
||||
| last_updated | timestamptz | 35 | √ | null |
|
|
System column. UTC Timestamp at which entry was calculated (lags shortly behind source system). |


