Net cash generated from operating activities in 2019 was RMB14,821.0 million, as compared to net loss of RMB6,967.6 million in the same period. The difference was primarily due to the increase of RMB12,650.8 million in payables to merchants, an increase of RMB3,652.6 million in merchant deposits, an increase of RMB2,648.9 million in accrued expenses and other liabilities, and an increase of RMB1,024.8 million in amounts due to related parties, partially offset by an increase of RMB886.9 million in amounts due from related parties and an increase of RMB803.4 million in receivables from online payment platforms. The increase in payables to merchants, merchant deposits and accrued expenses and other liabilities was attributable to our business expansion and the increase of number of merchants on our platform. The principal non-cash item affecting the difference between our net loss and our net cash generated from operating activities in 2019 was RMB2,557.7 million in share-based compensation expenses.
Investing activities
Net cash used in investing activities in 2021 was RMB35,562.4 million (US$5,580.5 million), primarily due to purchase of short-term investments of RMB116,639.6 million (US$18,303.3 million), purchase of long-term investments of RMB13,628.1 million (US$2,138.5 million), and purchase of property, equipment, software and intangible assets of RMB3,287.2 million (US$515.8 million), partially offset by proceeds from sales of short-term investments of RMB97,547.0 million (US$15,307.3 million).
Net cash used in investing activities in 2020 was RMB38,357.9 million, primarily due to purchase of short-term investments of RMB86,438.1 million and purchase of long-term investments of RMB6,722.2 million, partially offset by proceeds from sales of short-term investments of RMB55,083.4 million.
Net cash used in investing activities in 2019 was RMB28,319.7 million, primarily due to purchase of short-term investments of RMB52,451.6 million, partially offset by proceeds from sales of short-term investments of RMB24,797.6 million.
Financing activities
Net cash used in financing activities in 2021 was RMB1,875.2 million (US$294.3 million), primarily attributable to the repayment of short-term borrowings.
Net cash generated from financing activities in 2020 was RMB51,799.0 million, primarily attributable to the net proceeds from the follow-on offering, net proceeds from issuance of convertible bonds, and proceeds from the private placements.
Net cash generated from financing activities in 2019 was RMB15,854.7 million, primarily attributable to net proceeds from the follow-on offering, net proceeds from issuance of convertible bonds, and net proceeds from short-term borrowings.
Material cash requirements
Our material cash requirements as of December 31, 2021 and any subsequent interim period primarily include our capital expenditures, convertible bonds obligations, operating lease commitments and investment commitments.
Our capital expenditures are primarily incurred for purchases of computer equipment relating to the operation of our platform, furniture, office equipment and leasehold improvement for our office facilities and software. Our capital expenditures were RMB27.4 million in 2019, RMB43.0 million in 2020 and RMB3,287.2 million (US$515.8 million) in 2021.
Our convertible bonds obligations represent our principal payments. Please see “convertible bonds” under Note 12 to our audited consolidated financial statements. Payment due by December 31, 2021 for our convertible bonds obligations amounted to RMB14,193.9 million (US$2,227.3 million).
Our operating lease commitments mainly represent our obligations for leasing offices and warehouses, which include all future cash outflows under ASC Topic 842, Leases. Please see “Leases” under Note 8 to our audited consolidated financial statements. Payment due by December 31, 2021 for our operating lease commitments amounted to RMB1,032.4 million (US$162.0 million).
Our investment commitments primarily relate to capital contributions obligation under certain arrangement which does not have contractual maturity date. Payment due by December 31, 2021 for our investment commitments amounted to RMB140.0 million (US$22.0 million).