Track complete transactions
Wednesday, July 15, 2020 at 03:10pmHi, we want to keep track of the transactions that has been completed. We want to mark them as completed in our database. In order to avoid checking the same transactions more than once, we would like to retrieve the transactions that have been changed status as completed on the last 24 hours. I would like to ask if that's possible.
Thank you.
Regards
Reply to: Track complete transactions
Wednesday, July 15, 2020 at 03:47pmHi David,
Thanks for the posts! In terms of the package status tracking, we normally suggest to set up a callback listener to monitor the events of interest (guide here). So that whenever a package get completed, OneSpan Sign system will send a POST request to your registered URL and inform you the status change. On top of that, you can have a batch process pulling the latest updated packages within the last one or two days, via the package retrieval API:
GET /api/packages?query={status}&from={from}&to={to}&lastUpdatedStartDate={lastUpdatedStartDate}&lastUpdatedEndDate={lastUpdatedEndDate}
Note:
(1)"query" should be "COMPLETE" in your case.
(2)OneSpan Sign APIs have a limitation of 100 return entities, therefore you need to use "from=1&to=100", "from=101&to=200", etc, to paginate.
(3)"lastUpdatedStartDate" and "lastUpdatedEndDate" is in format of "yyyy-MM-dd" and won't take the date (Package completion date are recorded in GMT time). If not specifying "lastUpdatedEndDate", the end date will be the current time. Considering the time zone, you may want to pull for past two days to avoid missing any packages.
(4)Few events may update the package even after the package has been completed, for example if a signer has signer authentication, the person failed for maximum attempts and get locked. But this won't happen a lot.
Duo