Skip to main content
The transactions model allows setting three parameters.
  1. fields: a list of fields
  2. filters: a dictionary of filters
  3. sort: a list of sorting fields

fields

Fields allow the selection of which columns to export in the report.
All fieldsIf all fields should be included in a report, just set fields as null

filters

Filters allow filtering of the transactions’ data to be exported.
No filtersIf no filters should be applied, just set filters as null

Date-time filter

A date-time filter could be defined as follows.
start and end allow three types of values:
  1. Valid ISO 8601 timestamp with or without timezone. UTC is assumed if the time zone is not specified.
  2. Date-time placeholder to be set dynamically
  3. null: this represents an open range
The available placeholders for dynamic timestamps are:
  • day_start: replaced with the first instant of the day, for the period of time the execution is reading data from.
  • day_end: replaced with the last instant of the day, for the period of time the execution is reading data from.
  • week_start: replaced with the first instant of the week (for example Monday at 00:00), for the period of time the execution is reading data from.
  • week_end: replaced with the last instant of the week (for example Sunday at 23:59), for the period of time the execution is reading data from.
  • month_start: replaced with the first instant of the month, for the period of time the execution is reading data from.
  • month_end: replaced with the last instant of the month, for the period of time the execution is reading data from.

Validations

The validations below are checked:
  1. start <= end, only when both are timestamps
  2. start and end cannot be null at the same time

sort

The sort parameter allows selection of how to sort the data exported. This allows multiple columns to be used for sorting.
Sorting is only applied if at least one date-time filter is present with a duration of 31 days or less.
A sort parameter should have the format:
field can be:
  1. authorized_at
  2. captured_at
  3. created_at
  4. updated_at
  5. voided_at
order can be:
  1. asc: ascending order
  2. desc: descending order
No sortingIf no sorting should be applied, just set sort as null

Example

Example of report creation using the transactions model.