Skip to content

v_ai_payment_transactions_all

Applied-amount links between documents, same as v_ai_payment_transactions but including links belonging to voided transactions. Use v_ai_payment_transactions for everyday questions; use this view only when the user explicitly asks about voided/cancelled transactions.

  • Populated by: QuickBooks Online, QuickBooks Desktop, Xero

Columns

Name Type Nullable Allowed values Description
id character varying No — Kipper's internal row id, not the accounting system's id (that is source_id, where the view has one).
data_source_id character varying Yes — The entity (connected data source) this row belongs to. External IDs (source_id and the *_external_id columns) and company names are unique only within one entity, so join related rows on data_source_id as well as their external IDs.
source_id character varying Yes — The record's id in the accounting system; the join hints show which *_external_id columns point to it.
source_created_at timestamp with time zone Yes — Timestamp when this record was originally created in the source system. Preserves the original creation date from the accounting software.
source_updated_at timestamp with time zone Yes — Timestamp when this record was last modified in the source system. Used to detect changes and determine if re-sync is needed.
additional_detail_json jsonb Yes — Stores any additional details as JSON that do not fit into standard fields. Used for source-specific data or custom attributes.
last_synced_at timestamp with time zone Yes — Timestamp of the last sync operation that included this record. Used to detect stale records that may have been deleted in the source system.
transaction_external_id character varying Yes — ID of the document the amount is applied to in the source system. Usually an invoice or bill, but a prepayment/overpayment when a payment refunds one.
payment_external_id character varying Yes — ID of the document applying this amount in the source system. It can be a payment or a credit/prepayment being allocated.
credit_external_id character varying Yes — ID of the credit memo or credit note in the source system. Set only for credit-note allocations; null for payment and prepayment/overpayment rows.
applied_txn_type character varying Yes invoice, bill, creditmemo, vendorcredit, prepayment, vendorprepayment, overpayment, vendoroverpayment Kipper normalized type of transaction this payment is applied to. The prepayment/overpayment values (and their vendor variants) are Xero-only, and mirror the type of the prepayment header the refund was made against.
applied_amount numeric(18, 2) Yes — The amount of the payment or credit that was applied to the transaction

Joins

Relationships this view takes part in. External IDs are unique only within one connected entity, so every external-ID join matches on data_source_id as well.

  • v_ai_payment_transactions_all.transaction_external_id = v_ai_transactions_all.source_id AND v_ai_payment_transactions_all.data_source_id = v_ai_transactions_all.data_source_id
  • v_ai_payment_transactions_all.payment_external_id = v_ai_transactions_all.source_id AND v_ai_payment_transactions_all.data_source_id = v_ai_transactions_all.data_source_id

Across entities

A workspace can hold several connected companies. A query run across all of them returns rows from each, and external IDs (source_id and the *_external_id columns) and company names are unique only within one entity — so match on data_source_id too whenever you join or group.