v3.19.3.a.u2
Description of Business and Summary of Significant Accounting Policies - Narrative (Details)
$ / shares in Units, shares in Millions, $ in Millions
1 Months Ended 12 Months Ended
May 14, 2019
USD ($)
$ / shares
shares
Oct. 31, 2019
USD ($)
Dec. 31, 2019
USD ($)
renewal_option
segment
Dec. 31, 2018
USD ($)
Dec. 31, 2017
USD ($)
May 16, 2019
$ / shares
Jan. 01, 2019
USD ($)
Subsidiary, Sale of Stock [Line Items]              
Number of operating segments | segment     5        
Number of reportable segments | segment     5        
Gain on conversion of convertible notes     $ 327        
Gain on extinguishment of convertible notes and settlement of derivatives     444 $ 0 $ 0    
Embedded derivative liability income (expense) $ 117   58 (501) (173)    
Share-based compensation expense     4,596 172 137    
Additional deferred tax asset due to stock-based compensation expense     1,100        
Accumulated deficit     (16,362) (7,865)      
Chargebacks and credit card losses     195 208 174    
Built-to-suit assets, derecognized amounts     (1,731) (1,641)      
Equity method investments     $ 1,364 1,312      
Number of renewal options | renewal_option     1        
Lease renewal term     14 years        
Termination option period     1 year        
ROU assets generated from leased assets outside of the U.S. (Less than)     13.00%        
Advertising expenses     $ 1,300 1,300 1,100    
Incentives, refunds, and credits to end-users     2,500 1,400 $ 949    
Operating lease right-of-use assets     1,594        
Operating lease, liability     1,719        
Deferred tax liability, derecognized built-to-suit assets     $ 1,027 $ 1,072      
ASU 2016-02              
Subsidiary, Sale of Stock [Line Items]              
Accumulated deficit             $ (9)
Operating lease right-of-use assets             888
Operating lease, liability             963
Service-Based Awards              
Subsidiary, Sale of Stock [Line Items]              
Requisite service period     4 years        
Expected dividend yield     0.00%        
Performance-Based Awards              
Subsidiary, Sale of Stock [Line Items]              
Requisite service period     4 years        
Expected dividend yield     0.00% 0.00% 0.00%    
Share-based compensation, award vesting period     4 years        
Market-Based Awards              
Subsidiary, Sale of Stock [Line Items]              
Share-based compensation, award vesting period     5 years        
Minimum              
Subsidiary, Sale of Stock [Line Items]              
Intangible assets estimated useful lives     1 year        
Maximum              
Subsidiary, Sale of Stock [Line Items]              
Operating and finance leases, term of contract     76 years        
Intangible assets estimated useful lives     18 years        
Cornershop              
Subsidiary, Sale of Stock [Line Items]              
Consideration transferred   $ 459          
IPO              
Subsidiary, Sale of Stock [Line Items]              
Stock issued during period (in shares) | shares 180.0            
Stock price (in dollars per share) | $ / shares $ 45.00         $ 45.00  
Proceeds from issuance of common stock $ 8,000            
Conversion of shares (in shares) | shares 905.0            
Exercise of warrants (in shares) | shares 0.2            
Share-based compensation expense $ 3,600            
Shares withheld to meet tax withholding requirements (in shares) | shares 29.0            
Shares withheld to meet tax withholding requirement, value $ 1,300            
IPO | Common Stock              
Subsidiary, Sale of Stock [Line Items]              
Stock issued during period (in shares) | shares 76.0            
IPO | Holders of 2021 Convertible Notes and 2022 Convertible Notes              
Subsidiary, Sale of Stock [Line Items]              
Conversion of Convertible Notes to common stock in connection with initial public offering (in shares) | shares 94.0            
Underwriters' discounts and commissions              
Subsidiary, Sale of Stock [Line Items]              
Payments of stock issuance costs $ 106            
Build-to-suit lease arrangement | ASU 2016-02              
Subsidiary, Sale of Stock [Line Items]              
Financing obligation             (350)
Built-to-suit assets, derecognized amounts             392
Equity method investments             58
Deferred tax liability, derecognized built-to-suit assets             $ 9
Tranche One | Cornershop              
Subsidiary, Sale of Stock [Line Items]              
Consideration transferred   $ 50          
Percentage equity interest acquired   7.10%          
Sales and marketing              
Subsidiary, Sale of Stock [Line Items]              
Share-based compensation expense     $ 242 $ 9 $ 9    
Contract referral expense     103 136 199    
Cost of revenue              
Subsidiary, Sale of Stock [Line Items]              
Contract referral expense     $ 1,100 $ 837 $ 530