Poll transactions
This endpoint is used to regularly poll for new transactions that have been processed in Core.
You must define one of startDateTime
or pageToken
when making a request.
You may optionally define a pageSize
. The minimum pageSize
is 1, and the maximum pageSize
is 1000. The default is 100.
startDateTime
takes a string in ISO 8601 format. (ex: 2023-08-10T18:00:00Z
).
startDateTime
must be set to at least 1 minute in the past.
The results will contain transactions that occurred after this startDateTime
. Starting from the oldest to newest transactions ordered by the processedAt
field. Note, this is exclusive of the startDateTime
, a transaction occuring at exactly 2023-08-10T18:00:00Z
for instance, would not be included. In addition, there is a 15 second window where newly created transactions will not be included to account for any network latency or clock drifts within the systems to ensure you do not miss any transactions.
Each request will always return a nextPageToken
, regardless of whether there are new transactions or not.
We DO NOT recommend trying to roll your own polling strategy leveraging startDateTime
only. There are edge cases around two transactions occuring at the exact same time and being on the edge of a pagination which could cause you to miss one due to the exclusive nature of startDateTime
. We recommend using pageToken
’s instead.
When making subsequent polling requests (not initiating with startDateTime
), the pageToken
can be used to continue iterating through pages of transactions. Usage of the pageToken
guaruntees you will not miss any transactions on the stream. If at any point there are no more new transactions in the item
array, you will still receive a nextPageToken
. Continue to use this token to poll for new transactions. Once there are new transactions, they will be returned in the item
array.
pageToken
’s you have retrieved can serve as checkpoints. They do not expire, and you can always start from that point in the transaction stream again if you need to catch a system up or recover from a failure. Storing pageToken
’s as part of your polling process is encouraged.
pageToken
’s are unique per request, opaque, and should not be parsed or modified in any way. They are not guaranteed to be in any particular format, and may change in the future.
Authorizations
A Stedi API Key for authentication.
Query Parameters
The maximum number of elements to return in a page. You can set this to a maximum of 500 elements. If not specified, the default is 100.
x > 1
A token returned by a previous call to this operation in the nextPageToken
. If not specified, Stedi returns the first page of results.
1 - 1024
An ISO 8601 formatted string. For example 2023-08-28T00:00:00Z
. Stedi returns transactions processed after this time.
Was this page helpful?