Postman collection
Payments Read

pixiCAGetEvents

Returns customer account events (bookings), filtered by event type, dates, amounts, invoice, payment method or customer, optionally including deleted events.

Reads entries from the customer account (CustomerAccount) together with the currency code from pixi.Currency.

All filter parameters are optional and combined with AND. A filter is applied only if its parameter is not NULL:

  • EventID: exact match on the event type.
  • CreateDateFrom/CreateDateTo, UpdateDateFrom/UpdateDateTo, EventDateFrom/EventDateTo: inclusive ranges (>= / <=) on CreateDate, UpdateDate and EventDate.
  • MinAmount/MaxAmount: inclusive range on Amount.
  • MinMatchedAmount/MaxMatchedAmount: inclusive range on Matched.
  • InvoiceRef: exact match on the linked invoice.
  • DoNotRefund: exact match on the flag.
  • PaymentCode: joins Invoices via InvoiceRef and keeps only events whose invoice has this Payment code.
  • CustRef: applied only if the value is greater than 0.

If ShowDeleted = 1, deleted events are added from the history table CustomerAccountLog (rows with HistRemark = DELETE), using the same filters. These rows have IsDeleted = 1; active rows have IsDeleted = 0.

Without any filter, all customer account events are returned. The result has no defined sort order.

Notes

  • The query is built as dynamic SQL and executed with sp_executesql; all values are passed as parameters.
  • All tables are read with NOLOCK, so uncommitted data may appear.
  • Active and deleted rows are combined with UNION (not UNION ALL), so completely identical rows are returned only once.
  • Although Invoices is joined with a LEFT JOIN, the PaymentCode filter excludes all events without a linked invoice.
  • Events whose CurrencyId has no match in pixi.Currency are not returned (inner join).
  • Without filters, the call may return a very large number of rows; restricting by customer or date is recommended.

Tables used

CustomerAccount · Read CustomerAccountLog · Read Currency · Read Invoices · Read
SQL object:
dbo.pipiCAGetEvents
Updated at 2026-10-30