End of Cycle Processing
Learn how to efficiently process end of cycle deductions and integrate them with your payroll system using the Onsi API.
Recommended Strategy
Our recommended approach for end of cycle deduction processing follows a simple polling pattern that ensures you never miss a cycle and can easily integrate with any payroll system.
Set up regular polling
Configure your system to poll the Get Cycles endpoint on a regular cadence (daily is recommended, but you can adjust based on your needs).
Identify the latest closed cycle
From the cycles response, find the most recent cycle with status Closed
. This indicates that no more withdrawals
can be made and the cycle is ready for final accounting.
It’s worth noting that only when a Pay Cycle is Closed
are members no longer able to make withdrawals. Don’t
process your payroll until the cycle is Closed
.
Retrieve cycle deductions
Use the Get Cycle Deductions endpoint to get a complete list of all members and their total deduction amounts for the cycle.
Handle pagination
Paginate through all deduction results to ensure you capture every member’s deductions. The endpoint supports
pagination with skip
and take
parameters.
Integrate with your payroll system
Feed the deduction data into your payroll system using your preferred method - API integration, CSV upload, or automation tools.