v3.25.2
Borrowings - Additional information (Details)
$ / shares in Units, ¥ in Thousands, $ in Thousands
1 Months Ended 6 Months Ended 12 Months Ended
Feb. 01, 2024
CNY (¥)
shares
Feb. 01, 2024
USD ($)
shares
Jan. 15, 2021
USD ($)
shares
Dec. 31, 2024
CNY (¥)
shares
Dec. 31, 2024
USD ($)
shares
Nov. 30, 2024
CNY (¥)
shares
Nov. 30, 2024
USD ($)
shares
Nov. 30, 2020
USD ($)
shares
Jun. 30, 2025
CNY (¥)
Jun. 30, 2025
USD ($)
Jun. 30, 2024
CNY (¥)
shares
Dec. 31, 2024
CNY (¥)
Jun. 30, 2025
USD ($)
Feb. 28, 2025
CNY (¥)
Feb. 28, 2025
USD ($)
Feb. 29, 2024
CNY (¥)
Feb. 29, 2024
USD ($)
Dec. 31, 2023
CNY (¥)
Dec. 31, 2023
USD ($)
Oct. 31, 2023
USD ($)
$ / shares
Sep. 30, 2023
USD ($)
$ / shares
Dec. 31, 2022
CNY (¥)
Dec. 31, 2022
USD ($)
Jan. 31, 2021
USD ($)
$ / shares
Feb. 28, 2019
USD ($)
Borrowings                                                  
Short-term borrowings       ¥ 5,729,561         ¥ 5,438,829     ¥ 5,729,561 $ 759,231                        
Financial liabilities arising from sale and leaseback arrangements settled                 661,669   ¥ 68,345                            
Repayment of outstanding amount                 2,712,421 $ 378,639 ¥ 3,302,213                            
Facility amount       73,772,832         66,912,199     73,772,832                          
Non-collateral based bank                                                  
Borrowings                                                  
Facility amount       15,441,290         10,029,055     15,441,290                          
Collateral-based bank                                                  
Borrowings                                                  
Facility amount       58,331,542         56,883,144     58,331,542                          
Treasury Shares                                                  
Borrowings                                                  
Settlement of capped call options and zero strike call options (in shares) | shares 13,404,825 13,404,825                 13,404,825                            
Settlement of capped call options and zero strike call options ¥ 709,490                   ¥ (709,490)                            
Additional Paid in Capital                                                  
Borrowings                                                  
Settlement of capped call options and zero strike call options                     ¥ 709,490                            
Borrowings | Non-collateral based bank                                                  
Borrowings                                                  
Facility amount       7,104,500         4,151,500     7,104,500                          
Letters of Guarantee | Non-collateral based bank                                                  
Borrowings                                                  
Facility amount       2,537,005         2,200,050     2,537,005                          
Letters of Guarantee | Collateral-based bank                                                  
Borrowings                                                  
Facility amount       2,058,607         2,086,389     2,058,607                          
Banker's acceptance | Non-collateral based bank                                                  
Borrowings                                                  
Facility amount       330,000         584,000     330,000                          
Banker's acceptance | Collateral-based bank                                                  
Borrowings                                                  
Facility amount       16,658,660         16,236,850     16,658,660                          
Asset pledged                                                  
Borrowings                                                  
Short-term investments pledged to secure short-term bank borrowings       0         0     0                          
Short Term Borrowings At December 2024                                                  
Borrowings                                                  
Short-term borrowings       4,490,000               ¥ 4,490,000                          
Short Term Borrowings At December 2024 | Minimum                                                  
Borrowings                                                  
Short-term debt, interest rate (as a percent)                       2.10%                          
Short Term Borrowings At December 2024 | Maximum                                                  
Borrowings                                                  
Short-term debt, interest rate (as a percent)                       2.60%                          
Short Term Borrowings At June 2025                                                  
Borrowings                                                  
Short-term borrowings                 ¥ 4,068,000                                
Short Term Borrowings At June 2025 | Minimum                                                  
Borrowings                                                  
Short-term debt, interest rate (as a percent)                 2.20% 2.20%                              
Short Term Borrowings At June 2025 | Maximum                                                  
Borrowings                                                  
Short-term debt, interest rate (as a percent)                 2.55% 2.55%                              
Convertible notes                                                  
Borrowings                                                  
Convertible senior notes | $                                                 $ 650,000
Additional convertible senior notes | $                                                 $ 100,000
Interest rate                                                 4.50%
Aggregate principal amount converted | $               $ 7                                  
Convertible notes | Class A Ordinary Shares                                                  
Borrowings                                                  
Shares issued upon conversion | shares               735                                  
Convertible notes | American Depositary Shares                                                  
Borrowings                                                  
Conversion price | $ / shares                                       $ 11.12 $ 11.12     $ 93.06  
Convertible Senior Notes Due 2024                                                  
Borrowings                                                  
Convertible senior notes | $                         578,902                        
Aggregate principal amount converted | $     $ 581,685                                            
Shares issued upon conversion | shares     62,192,017                                            
Conversion premium | $     $ 56,359                   56,359                        
Repayment of outstanding amount ¥ 1,168,732 $ 164,520                                              
Convertible Senior Notes Due 2026                                                  
Borrowings                                                  
Convertible senior notes       6,534         ¥ 6,516     ¥ 6,534                          
Aggregate principal amount of notes | $                                               $ 750,000  
Interest rate                                               0.00%  
Portion of notes repurchased                               ¥ 2,122,155 $ 298,689 ¥ 1,801,685 $ 253,762     ¥ 1,317,106 $ 190,962    
Convertible Senior Notes Due 2026 | American Depositary Shares                                                  
Borrowings                                                  
Percentage of principal amount of notes to be repurchased for repurchase price                                               100.00%  
Convertible Senior Notes Due 2027                                                  
Borrowings                                                  
Convertible senior notes       2,706,285         1,518     2,706,285                          
Aggregate principal amount of notes | $                                               $ 750,000  
Interest rate                                               0.50%  
Portion of notes repurchased                           ¥ 2,712,412 $ 378,312     ¥ 1,719,944 $ 242,249            
Aggregate principal amount converted | $         $ 127,090   $ 127,090                                    
Current portion of convertible notes       2,706,285               2,706,285                          
Conversion rate principle amount | $         $ 1,000   $ 1,000                                    
Convertible Senior Notes Due 2027 | Treasury Shares                                                  
Borrowings                                                  
Derecognized treasury stock       2,214,029   ¥ 2,214,029                                      
Convertible Senior Notes Due 2027 | Additional Paid in Capital                                                  
Borrowings                                                  
Derecognized treasury stock       ¥ 1,311,200   ¥ 1,311,200                                      
Convertible Senior Notes Due 2027 | American Depositary Shares                                                  
Borrowings                                                  
Percentage of principal amount of notes to be repurchased for repurchase price                                               100.00%  
Shares issued upon conversion | shares       27,690,071 27,690,071 27,690,071 27,690,071                                    
Convertible Senior Notes Due 2027 | Minimum | American Depositary Shares                                                  
Borrowings                                                  
Conversion rates       207 207 207 207                                    
Convertible Senior Notes Due 2027 | Maximum | American Depositary Shares                                                  
Borrowings                                                  
Conversion rates       227.6 227.6 227.6 227.6                                    
Convertible Senior Notes Due 2026 and 2027 | ASU 2020-06                                                  
Borrowings                                                  
Long-term borrowings | $                         26,340                        
Capped Call Transactions and Zero-Strike Call Transactions                                                  
Borrowings                                                  
Shares issued upon conversion | shares     16,402,643                                            
Interest expense, debt                 1,849,600                                
Convertible Senior Notes, Due 2029                                                  
Borrowings                                                  
Aggregate principal amount of notes | $                                         $ 575,000        
Interest rate                                         3.875%        
Convertible Senior Notes, Due 2029 | American Depositary Shares                                                  
Borrowings                                                  
Percentage of principal amount of notes to be repurchased for repurchase price                                         100.00%        
Convertible Senior Notes, Due 2030                                                  
Borrowings                                                  
Aggregate principal amount of notes | $                                       $ 575,000          
Interest rate                                       4.625%          
Convertible Senior Notes, Due 2030 | American Depositary Shares                                                  
Borrowings                                                  
Percentage of principal amount of notes to be repurchased for repurchase price                                       100.00%          
Convertible Senior Notes Due 2029 and 2030                                                  
Borrowings                                                  
Convertible senior notes       ¥ 8,160,462         ¥ 8,135,257     ¥ 8,160,462                          
Convertible Senior Notes Due 2029 and 2030 | ASU 2020-06                                                  
Borrowings                                                  
Long-term borrowings | $                         $ 17,855