v3.22.0.1

Investments (Tables) | 12 Months Ended
--- | ---
Dec. 31, 2021
Investments, Debt and Equity Securities [Abstract] |
Schedule of Cash and Cash Equivalents | The following table reconciles cash, cash equivalents, and restricted cash reported on the Company’s consolidated balance sheets to the total amount presented in the consolidated statements of cash flows (in thousands):
| As of December 31,
| 2019 | 2020 | 2021
Cash and cash equivalents | $ | 2,013,547 |  | $ | 5,480,557 |  | $ | 6,067,438 |
Cash and cash equivalents included in funds receivable and amounts held on behalf of customers | 3,129,781 |  | 2,153,849 |  | 3,645,087 |
Restricted cash | 115 |  | 33,846 |  | 14,764 |
Total cash, cash equivalents, and restricted cash presented in the consolidated statements of cash flows | $ | 5,143,443 |  | $ | 7,668,252 |  | $ | 9,727,289 |
The following tables summarize the amortized cost, gross unrealized gains and losses, and fair value of the Company’s available-for-sale debt securities aggregated by investment category (in thousands):
| December 31, 2020 |  |  | Classification as of December 31, 2020
| Cost or Amortized Cost | Gross Unrealized Gains | Gross Unrealized Losses | Total Estimated Fair Value |  |  | Cash and Cash Equivalents | Marketable Securities | Other Assets, Noncurrent | Funds Receivable(2)
Certificates of deposit | $ | 421,272 |  | $ | — |  | $ | — |  | $ | 421,272 |  |  |  | $ | 278,281 |  | $ | 142,991 |  | $ | — |  | $ | — |
Government bonds(1) | 1,924,988 |  | 65 |  | (1) |  | 1,925,052 |  |  |  | 1,392,966 |  | 65,867 |  | — |  | 466,219 |
Commercial paper | 1,021,150 |  | — |  | — |  | 1,021,150 |  |  |  | 779,527 |  | 241,623 |  | — |  | — |
Corporate debt securities | 508,901 |  | 1,475 |  | (1,635) |  | 508,741 |  |  |  | 229,633 |  | 267,618 |  | 11,490 |  | — |
Mortgage-backed and asset-backed securities | 36,553 |  | 913 |  | (113) |  | 37,353 |  |  |  | — |  | 37,353 |  | — |  | — |
Total | $ | 3,912,864 |  | $ | 2,453 |  | $ | (1,749) |  | $ | 3,913,568 |  |  |  | $ | 2,680,407 |  | $ | 755,452 |  | $ | 11,490 |  | $ | 466,219 |
(1)Includes U.S. government and government agency debt securities (2)Funds receivable and amounts held on behalf of customers
| December 31, 2021 |  |  | Classification as of December 31, 2021
| Cost or Amortized Cost | Gross Unrealized Gains | Gross Unrealized Losses | Total Estimated Fair Value |  |  | Cash and Cash Equivalents | Marketable Securities | Other Assets, Noncurrent | Funds Receivable(2)
Certificates of deposit | $ | 395,351 |  | $ | — |  | $ | — |  | $ | 395,351 |  |  |  | $ | 31,117 |  | $ | 364,234 |  | $ | — |  | $ | — |
Government bonds(1) | 850 |  | 13 |  | — |  | 863 |  |  |  | — |  | 863 |  | — |  | — |
Commercial paper | 1,156,963 |  | — |  | — |  | 1,156,963 |  |  |  | 163,959 |  | 993,004 |  | — |  | — |
Corporate debt securities | 917,718 |  | 220 |  | (3,147) |  | 914,791 |  |  |  | 41,439 |  | 862,901 |  | 10,451 |  | — |
Mortgage-backed and asset-backed securities | 34,019 |  | 338 |  | (321) |  | 34,036 |  |  |  | — |  | 34,036 |  | — |  | — |
Total | $ | 2,504,901 |  | $ | 571 |  | $ | (3,468) |  | $ | 2,502,004 |  |  |  | $ | 236,515 |  | $ | 2,255,038 |  | $ | 10,451 |  | $ | — |
(1)Includes U.S. government and government agency debt securities (2)Funds receivable and amounts held on behalf of customers
Debt Securities, Available-for-sale | The following tables summarize the amortized cost, gross unrealized gains and losses, and fair value of the Company’s available-for-sale debt securities aggregated by investment category (in thousands):
| December 31, 2020 |  |  | Classification as of December 31, 2020
| Cost or Amortized Cost | Gross Unrealized Gains | Gross Unrealized Losses | Total Estimated Fair Value |  |  | Cash and Cash Equivalents | Marketable Securities | Other Assets, Noncurrent | Funds Receivable(2)
Certificates of deposit | $ | 421,272 |  | $ | — |  | $ | — |  | $ | 421,272 |  |  |  | $ | 278,281 |  | $ | 142,991 |  | $ | — |  | $ | — |
Government bonds(1) | 1,924,988 |  | 65 |  | (1) |  | 1,925,052 |  |  |  | 1,392,966 |  | 65,867 |  | — |  | 466,219 |
Commercial paper | 1,021,150 |  | — |  | — |  | 1,021,150 |  |  |  | 779,527 |  | 241,623 |  | — |  | — |
Corporate debt securities | 508,901 |  | 1,475 |  | (1,635) |  | 508,741 |  |  |  | 229,633 |  | 267,618 |  | 11,490 |  | — |
Mortgage-backed and asset-backed securities | 36,553 |  | 913 |  | (113) |  | 37,353 |  |  |  | — |  | 37,353 |  | — |  | — |
Total | $ | 3,912,864 |  | $ | 2,453 |  | $ | (1,749) |  | $ | 3,913,568 |  |  |  | $ | 2,680,407 |  | $ | 755,452 |  | $ | 11,490 |  | $ | 466,219 |
(1)Includes U.S. government and government agency debt securities (2)Funds receivable and amounts held on behalf of customers
| December 31, 2021 |  |  | Classification as of December 31, 2021
| Cost or Amortized Cost | Gross Unrealized Gains | Gross Unrealized Losses | Total Estimated Fair Value |  |  | Cash and Cash Equivalents | Marketable Securities | Other Assets, Noncurrent | Funds Receivable(2)
Certificates of deposit | $ | 395,351 |  | $ | — |  | $ | — |  | $ | 395,351 |  |  |  | $ | 31,117 |  | $ | 364,234 |  | $ | — |  | $ | — |
Government bonds(1) | 850 |  | 13 |  | — |  | 863 |  |  |  | — |  | 863 |  | — |  | — |
Commercial paper | 1,156,963 |  | — |  | — |  | 1,156,963 |  |  |  | 163,959 |  | 993,004 |  | — |  | — |
Corporate debt securities | 917,718 |  | 220 |  | (3,147) |  | 914,791 |  |  |  | 41,439 |  | 862,901 |  | 10,451 |  | — |
Mortgage-backed and asset-backed securities | 34,019 |  | 338 |  | (321) |  | 34,036 |  |  |  | — |  | 34,036 |  | — |  | — |
Total | $ | 2,504,901 |  | $ | 571 |  | $ | (3,468) |  | $ | 2,502,004 |  |  |  | $ | 236,515 |  | $ | 2,255,038 |  | $ | 10,451 |  | $ | — |
(1)Includes U.S. government and government agency debt securities (2)Funds receivable and amounts held on behalf of customers
Contractual Maturities of the Available-for-Sale Debt Securities | The following table summarizes the contractual maturities of the Company’s available-for-sale debt securities (in thousands):
|  |  | December 31, 2021
|  |  |  | Amortized Cost | Estimated Fair Value
Due within one year |  |  |  | $ | 2,359,069 |  | $ | 2,358,792 |
Due in one year to five years |  |  |  | 130,273 |  | 127,861 |
Due within five to ten years |  |  |  | 13,019 |  | 12,837 |
Due beyond ten years |  |  |  | 2,540 |  | 2,514 |
Total |  |  |  | $ | 2,504,901 |  | $ | 2,502,004 |
Equity Securities without Readily Determinable Fair Value | The following table summarizes the total carrying value of equity investments without readily determinable fair values (in thousands):
| Year Ended December 31,
| 2020 | 2021
Carrying value, beginning of period | $ | 131,210 |  | $ | 78,074 |
Downward adjustments for observable price changes and impairment | (53,136) |  | (3,081) |
Carrying value, end of period | $ | 78,074 |  | $ | 74,993 |
The following table summarizes the cumulative impairment charges of equity investments without readily determinable fair values (in thousands):
| As of December 31,
| 2020 | 2021
Cumulative downward adjustments for observable price changes and impairment | $ | 53,136 |  | $ | 56,217 |

X
- Definition Tabular disclosure of investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale). + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Publisher FASB -Name Accounting Standards Codification -Topic 320 -URI http://asc.fasb.org/topic&trid=2196928 + Details
Name: | us-gaap_DebtSecuritiesAvailableForSaleTableTextBlock
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- Definition Tabular disclosure of investment in equity security without readily determinable fair value. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Publisher FASB -Name Accounting Standards Codification -Topic 321 -SubTopic 10 -Section 50 -Paragraph 3 -Subparagraph (a) -URI http://asc.fasb.org/extlink&oid=123583765&loc=SL75117539-209714 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Publisher FASB -Name Accounting Standards Codification -Topic 321 -SubTopic 10 -Section 50 -Paragraph 3 -Subparagraph (c) -URI http://asc.fasb.org/extlink&oid=123583765&loc=SL75117539-209714 Reference 3: http://www.xbrl.org/2009/role/commonPracticeRef -Publisher FASB -Name Accounting Standards Codification -Topic 321 -SubTopic 10 -Section 50 -Paragraph 3 -Subparagraph (b) -URI http://asc.fasb.org/extlink&oid=123583765&loc=SL75117539-209714 + Details
Name: | us-gaap_EquitySecuritiesWithoutReadilyDeterminableFairValueTableTextBlock
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- Definition Tabular disclosure of maturities of an entity's investments as well as any other information pertinent to the investments. + References No definition available. + Details
Name: | us-gaap_InvestmentsClassifiedByContractualMaturityDateTableTextBlock
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- References No definition available. + Details
Name: | us-gaap_InvestmentsDebtAndEquitySecuritiesAbstract
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Tabular disclosure of the components of cash and cash equivalents. + References No definition available. + Details
Name: | us-gaap_ScheduleOfCashAndCashEquivalentsTableTextBlock
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:textBlockItemType
Balance Type: | na
Period Type: | duration