Invoices

Table name: invoices

New Table

This is a newly added table exposing invoice data in the Partner Data Warehouse.

Invoice data from the wallet billing service. Each invoice is a periodic billing document tied to operator billing relationships. Invoices are matched to the partner via wallet ownership — an invoice is included if either the invoiced or invoicing wallet belongs to a team or operator within the partner's scope. No filters applied on deleted_at — deleted invoices are included so partners can filter as needed.

SQL: invoices

Schema

Column NameData TypeDescription
Primary ID
idINTEGERPrimary key, unique identifier for each invoice
Other IDs
serial_numberVARCHARHuman-readable invoice serial number assigned by the billing service
invoiced_wallet_idINTEGERID of the wallet being invoiced (the party that owes payment)
invoicing_wallet_idINTEGERID of the wallet issuing the invoice (the party collecting payment)
invoiced_owner_idINTEGERID of the entity that owns the invoiced wallet (team or operator)
invoicing_owner_idINTEGERID of the entity that owns the invoicing wallet (team or operator)
pay_identifierVARCHARPayment identifier used for matching payments to invoices
Timestamps
created_atTIMESTAMP_NTZTimestamp when the invoice was created
deleted_atTIMESTAMP_NTZTimestamp when the invoice was soft deleted, null if not deleted
fully_paid_atTIMESTAMP_NTZTimestamp when the invoice was fully paid
due_atTIMESTAMP_NTZDue date for the invoice payment
period_fromTIMESTAMP_NTZStart of the billing period covered by this invoice
period_toTIMESTAMP_NTZEnd of the billing period covered by this invoice
Filters
is_invoiced_team_matchBOOLEANTrue if the invoiced wallet belongs to a team within the partner's scope
is_invoicing_team_matchBOOLEANTrue if the invoicing wallet belongs to a team within the partner's scope
is_invoiced_operator_matchBOOLEANTrue if the invoiced wallet belongs to an operator within the partner's scope
is_invoicing_operator_matchBOOLEANTrue if the invoicing wallet belongs to an operator within the partner's scope
Attributes
invoiced_owner_typeVARCHARType of the invoiced wallet owner: TEAM or OPERATOR
invoicing_owner_typeVARCHARType of the invoicing wallet owner: TEAM or OPERATOR
currencyVARCHARCurrency code of the invoice (lowercase ISO 4217)
statement_closing_balanceNUMBERClosing balance from the invoice statement in original currency
statement_payable_amountNUMBERPayable amount from the invoice statement in original currency
statement_typeVARCHARType of the invoice statement (e.g. COMPOSITE)
invoice_groupVARCHARGrouping category for the invoice

Inclusion Criteria

Invoices are included if either the invoiced or invoicing wallet belongs to a team or operator within the partner's scope (same wallet-ownership filtering as the transactions table).

No filters are applied on deleted_at — all invoices linked to the partner's teams or operators are included. Partners can filter as needed.

Data flow

Upstream tablesDownstream tables
teams---
operators---
wallets---