FAIR VALUE OF FINANCIAL INSTRUMENTS - Financial Assets and Liabilities Measured at Fair Value on a Recurring Basis (Details) - USD ($) $ in Thousands | Sep. 30, 2019 | Dec. 31, 2018 |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Customer funds | $ 660,599 | $ 334,017 |
Short-term debt securities | 557,656 | 540,991 |
Long-term debt securities | 564,508 | 464,680 |
Marketable equity investment | 28,875 | 45,342 |
U.S. agency securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Customer funds | 1,654 | 27,291 |
U.S. government securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Customer funds | 222,172 | 72,671 |
Fair Value, Measurements, Recurring | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable equity investment | 28,875 | 45,342 |
Total | 1,199,215 | 904,119 |
Fair Value, Measurements, Recurring | Level 1 | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 304,690 | 218,109 |
Customer funds | 388 | 18 |
Fair Value, Measurements, Recurring | Level 1 | U.S. agency securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Customer funds | 0 | 0 |
Short-term debt securities | 0 | 0 |
Long-term debt securities | 0 | 0 |
Fair Value, Measurements, Recurring | Level 1 | Time deposits | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 10,146 | 0 |
Fair Value, Measurements, Recurring | Level 1 | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Short-term debt securities | 0 | 0 |
Long-term debt securities | 0 | 0 |
Fair Value, Measurements, Recurring | Level 1 | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Short-term debt securities | 0 | 0 |
Fair Value, Measurements, Recurring | Level 1 | U.S. government securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 23,963 | 0 |
Customer funds | 229,171 | 108,020 |
Short-term debt securities | 351,717 | 292,267 |
Long-term debt securities | 250,265 | 154,124 |
Fair Value, Measurements, Recurring | Level 1 | Municipal securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 86,239 |
Short-term debt securities | 0 | 0 |
Long-term debt securities | 0 | 0 |
Fair Value, Measurements, Recurring | Level 1 | Foreign securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Short-term debt securities | 0 | 0 |
Long-term debt securities | 0 | 0 |
Fair Value, Measurements, Recurring | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable equity investment | 0 | 0 |
Total | 583,913 | 696,966 |
Fair Value, Measurements, Recurring | Level 2 | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Customer funds | 0 | 0 |
Fair Value, Measurements, Recurring | Level 2 | U.S. agency securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 40,410 | 46,423 |
Customer funds | 23,321 | 67,282 |
Short-term debt securities | 132,348 | 80,122 |
Long-term debt securities | 87,903 | 114,560 |
Fair Value, Measurements, Recurring | Level 2 | Time deposits | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Fair Value, Measurements, Recurring | Level 2 | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Short-term debt securities | 55,501 | 109,519 |
Long-term debt securities | 185,563 | 159,252 |
Fair Value, Measurements, Recurring | Level 2 | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Short-term debt securities | 2,245 | 0 |
Fair Value, Measurements, Recurring | Level 2 | U.S. government securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Customer funds | 0 | 0 |
Short-term debt securities | 0 | 0 |
Long-term debt securities | 0 | 0 |
Fair Value, Measurements, Recurring | Level 2 | Municipal securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Short-term debt securities | 2,669 | 27,832 |
Long-term debt securities | 12,582 | 28,594 |
Fair Value, Measurements, Recurring | Level 2 | Foreign securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 23,981 |
Short-term debt securities | 13,176 | 31,251 |
Long-term debt securities | 28,195 | 8,150 |
Fair Value, Measurements, Recurring | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable equity investment | 0 | 0 |
Total | 0 | 0 |
Fair Value, Measurements, Recurring | Level 3 | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Customer funds | 0 | 0 |
Fair Value, Measurements, Recurring | Level 3 | U.S. agency securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Customer funds | 0 | 0 |
Short-term debt securities | 0 | 0 |
Long-term debt securities | 0 | 0 |
Fair Value, Measurements, Recurring | Level 3 | Time deposits | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Fair Value, Measurements, Recurring | Level 3 | Corporate bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Short-term debt securities | 0 | 0 |
Long-term debt securities | 0 | 0 |
Fair Value, Measurements, Recurring | Level 3 | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Short-term debt securities | 0 | 0 |
Fair Value, Measurements, Recurring | Level 3 | U.S. government securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Customer funds | 0 | 0 |
Short-term debt securities | 0 | 0 |
Long-term debt securities | 0 | 0 |
Fair Value, Measurements, Recurring | Level 3 | Municipal securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Short-term debt securities | 0 | 0 |
Long-term debt securities | 0 | 0 |
Fair Value, Measurements, Recurring | Level 3 | Foreign securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Cash equivalents | 0 | 0 |
Short-term debt securities | 0 | 0 |
Long-term debt securities | $ 0 | $ 0 |