Overview
TheCollectionStatus enum represents the various states of the device data collection process. These status values are returned by the KountSDK.getCollectionStatus() method.
Package
Status Values
COMPLETED
Indicates that device data collection has completed successfully.COMPLETED, the session ID is available and can be retrieved using KountSDK.getSessionId(). You can proceed with your transaction or checkout flow.
Example:
FAILED
Indicates that device data collection has failed.FAILED, the collection process encountered an error. The error details are provided through the failure callback when using collectForSession(). You may want to retry collection or proceed with your transaction flow without the enhanced device data.
Example:
IN_PROGRESS
Indicates that device data collection is currently in progress.IN_PROGRESS, the collection process is actively gathering device data. Wait for the process to complete before proceeding with transactions. You can monitor this status to show loading indicators or progress feedback to users.
Example:
Usage
Checking Status
ThegetCollectionStatus() method returns the status as a string representation:
Status Flow
The typical status flow during a collection session:- Initial State - No status or empty before collection starts
- IN_PROGRESS - When
collectForSession()is called - COMPLETED or FAILED - Final state when collection finishes
Best Practices
Monitor During Collection
Check the status while collection is in progress to provide user feedback.
Handle All States
Implement handling for all three status values in your application logic.
Use Callbacks
Prefer using the success/failure callbacks instead of polling the status.
Log Status Changes
Log status changes during development to understand the collection flow.
Example: Status Monitoring
Related
- KountSDK - Main SDK class with
getCollectionStatus()method - Success Callback - Called when status becomes COMPLETED
- Failure Callback - Called when status becomes FAILED
