FAIR VALUE MEASUREMENTS - Schedule of Financial Assets and Financial Liabilities Measured at Fair Value on a Recurring Basis (Details) - USD ($) $ in Thousands | Dec. 31, 2023 | Jun. 30, 2023 |
U.S. Treasury and direct obligations of U.S. government agencies | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | $ 86,843 | $ 71,397 |
Corporate bonds | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 213,434 | 169,612 |
Commercial paper | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 612 | 2,974 |
Other securities | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 18,264 | 21,360 |
Fair Value, Recurring | | |
Funds held for clients—available-for-sale: | | |
Assets, fair value disclosure | 1,325,163 | 1,049,156 |
Fair Value, Recurring | U.S. Treasury and direct obligations of U.S. government agencies | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 86,843 | 71,397 |
Fair Value, Recurring | Corporate bonds | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 213,434 | 169,612 |
Fair Value, Recurring | Commercial paper | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 612 | 2,974 |
Fair Value, Recurring | Other securities | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 18,264 | 21,360 |
Fair Value, Recurring | Level 1 | | |
Funds held for clients—available-for-sale: | | |
Assets, fair value disclosure | 1,006,010 | 783,813 |
Fair Value, Recurring | Level 1 | U.S. Treasury and direct obligations of U.S. government agencies | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 0 | 0 |
Fair Value, Recurring | Level 1 | Corporate bonds | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 0 | 0 |
Fair Value, Recurring | Level 1 | Commercial paper | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 0 | 0 |
Fair Value, Recurring | Level 1 | Other securities | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 0 | 0 |
Fair Value, Recurring | Level 2 | | |
Funds held for clients—available-for-sale: | | |
Assets, fair value disclosure | 319,153 | 265,343 |
Fair Value, Recurring | Level 2 | U.S. Treasury and direct obligations of U.S. government agencies | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 86,843 | 71,397 |
Fair Value, Recurring | Level 2 | Corporate bonds | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 213,434 | 169,612 |
Fair Value, Recurring | Level 2 | Commercial paper | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 612 | 2,974 |
Fair Value, Recurring | Level 2 | Other securities | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 18,264 | 21,360 |
Fair Value, Recurring | Level 3 | | |
Funds held for clients—available-for-sale: | | |
Assets, fair value disclosure | 0 | 0 |
Fair Value, Recurring | Level 3 | U.S. Treasury and direct obligations of U.S. government agencies | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 0 | 0 |
Fair Value, Recurring | Level 3 | Corporate bonds | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 0 | 0 |
Fair Value, Recurring | Level 3 | Commercial paper | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 0 | 0 |
Fair Value, Recurring | Level 3 | Other securities | | |
Funds held for clients—available-for-sale: | | |
Debt securities, available-for-sale | 0 | 0 |
Demand deposit accounts and other cash equivalents | | |
Funds held for clients—cash and cash equivalents: | | |
Demand deposit accounts and other cash equivalents | 1,006,010 | 783,813 |
Demand deposit accounts and other cash equivalents | Fair Value, Recurring | | |
Funds held for clients—cash and cash equivalents: | | |
Demand deposit accounts and other cash equivalents | 1,006,010 | 783,813 |
Demand deposit accounts and other cash equivalents | Fair Value, Recurring | Level 1 | | |
Funds held for clients—cash and cash equivalents: | | |
Demand deposit accounts and other cash equivalents | 1,006,010 | 783,813 |
Demand deposit accounts and other cash equivalents | Fair Value, Recurring | Level 2 | | |
Funds held for clients—cash and cash equivalents: | | |
Demand deposit accounts and other cash equivalents | 0 | 0 |
Demand deposit accounts and other cash equivalents | Fair Value, Recurring | Level 3 | | |
Funds held for clients—cash and cash equivalents: | | |
Demand deposit accounts and other cash equivalents | $ 0 | $ 0 |