Summary of Significant Accounting Policies | 2. Summary of Significant Accounting Policies Basis of Presentation The consolidated financial statements and accompanying notes were prepared in accordance with accounting principles generally accepted in the United States of America (“U.S. GAAP”). The Company had no components of other comprehensive income (loss) during any of the periods presented, as such, a consolidated statement of comprehensive income (loss) is not presented. Reclassification The Company reclassified certain prior year amounts to conform to the current year presentation. These reclassifications had no impact on the previously reported total assets, liabilities, stockholder's deficit or net income. Principles of Consolidation The consolidated financial statements include the accounts of Bandwidth Inc. and its wholly owned subsidiaries. All intercompany accounts and transactions have been eliminated in consolidation. Use of Estimates The preparation of the Company’s consolidated financial statements in conformity with U.S. GAAP requires the Company to make estimates and judgments that affect the amounts reported in these financial statements and accompanying notes. Although the Company believes that the estimates it uses are reasonable, due to the inherent uncertainty involved in making these estimates, actual results reported in future periods could differ from those estimates. These estimates in the consolidated financial statements include, but are not limited to, allowance for doubtful accounts, recoverability of long lived and intangible assets, customer relationship period, valuation allowances on tax assets, certain accrued expenses, and contingencies. Revenue Recognition Revenue consists primarily of the sale of communications services offered through API software solutions to large enterprise, as well as small and medium-sized business, customers and are generally derived from usage and monthly service fees for both the CPaaS and Other segments. Usage revenue includes voice communication (primarily driven by inbound minutes, outbound minutes, toll-free minutes) and messaging communication (driven by the number of messages) that traverse the platform and network. Revenue for these services is recognized in the period the usage occurs. Monthly service fees include the provision and management of phone numbers and emergency services access, which is recognized as the service is provided. In addition, the Company earns Carrier Access Billings ("CABS") revenue by allowing interconnected telecommunication carriers to pass traffic through its network and, as such the Company is the principal in delivering communication services to such carriers. Due to the lack of timeliness of payments and the frequency of carrier disputes, the Company recognizes revenue related to this service only when collectability is probable. When required as part of providing service, revenues and associated expenses related to nonrefundable, upfront service activation and setup fees are deferred and recognized over the longer of the associated service contract period or estimated customer life. Revenue recognition commences when all of the following criteria are met (i) persuasive evidence of an arrangement exists; (ii) delivery has occurred; (iii) the fee is fixed or determinable; and (iv) collection is probable. Customers generally enter into arrangements that are typically two to three years in length. Cost of Revenue CPaaS cost of revenue consists primarily of fees paid to other network service providers from whom the Company buys services such as minutes of use, phone numbers, messages, porting of customer numbers, and network circuits. Cost of revenue also contains costs related to the support of the network, web services and cloud infrastructure, capacity planning and management, rent for network facilities, software licenses, hardware and software maintenance fees, and network engineering services. Personnel costs (including non-cash stock-based compensation expenses) associated with personnel who are responsible for the delivery of services, operation and maintenance of the communications network, customer support, as well as, third party support agreements, and depreciation are also recorded as cost of revenue. Other cost of revenue consists of amortization of capital software development costs related to platform applications supporting non-CPaaS services including circuit costs paid to third party providers, internet connectivity expenses, minutes of use, contractors, regulatory fees and surcharges, depreciation, and software and hardware maintenance fees. Operating Expenses Research and Development Research and development expenses consist primarily of personnel costs (including non-cash stock-based compensation expenses), outsourced software development and engineering services and cloud infrastructure fees for staging and development outsourced engineering services. Sales and Marketing Sales and marketing expenses consist primarily of personnel costs, including commissions for sales employees and non-cash stock-based compensation expenses. Sales and marketing expenses also include expenditures related to advertising, marketing, brand awareness activities, sales support and professional services fees. General and Administrative General and administrative expenses consist primarily of personnel costs for support personnel and executives in accounting, finance, legal, information services, human resources and administrative functions. General and administrative expenses also include costs related to product management and reporting, data services, customer billing and collection functions, and other professional services fees, credit card processing fees, rent associated with the Company’s headquarters in Raleigh, North Carolina, depreciation and amortization. Cash and Cash Equivalents The Company considers all highly liquid investments with an original or remaining maturity of three months or less at the date of purchase, as well as overnight repurchase investments, to be cash equivalents. Restricted Cash The Company classifies any cash and cash equivalents that are currently restricted from use as restricted cash. As of December 31, 2016 and 2017 , restricted cash is used to secure letters of credit issued in order to operate the CLEC, for Automated Clearing House availability, customer deposits and for credit card security. As of December 31, 2016 and 2017 , restricted cash was $240 and $243 , respectively. The Company has classified this asset as a long-term asset in order to match the expected period of restriction and is included in Other long-term assets in the consolidated balance sheets. Accounts Receivable and Allowance for Doubtful Accounts Accounts receivable are stated at realizable value, net of an allowance for doubtful accounts. The allowance for doubtful accounts is based on management’s assessment of the collectability of its customer accounts. The Company regularly reviews the composition of the accounts receivable aging, historical bad debts, changes in payment patterns, customer creditworthiness and current economic trends. If the financial condition of customers were to deteriorate, resulting in their inability to make required payments, additional provisions for doubtful accounts would be required and would increase bad debt expense. Management has evaluated the collectability of trade accounts receivable and determined that allowances of approximately $22,571 and $32,463 for uncollectible accounts and customer balances that are disputed were required as of December 31, 2016 and 2017 , respectively. The allowance for doubtful accounts primarily relates to billings for CABS services where collectability was deemed not probable. Refer to Note 5, "Financial Statement Components," for a rollforward of the components of the allowance for doubtful accounts as of December 31, 2016 and 2017 . Refer also to Note 17, "Subsequent Events," for discussion of the settlement agreement that was entered into subsequent to year-end that resolved the ongoing dispute and litigation with MCI Communications Services, Inc. d/b/a Verizon Business and Verizon Select Services, Inc. (collectively, “Verizon”), which is a CABS customer of the Company. The Company includes unbilled receivables in its accounts receivable balance. Generally, these receivables represent services provided to customers, which will be billed in the next billing cycle. All amounts are considered collectible and billable. As of December 31, 2016 and 2017 , unbilled receivables were $7,368 and $8,653 , respectively. Concentration of Credit Risk Financial instruments that are exposed to concentration of credit risk consist primarily of cash and cash equivalents and trade accounts receivable. Cash deposits may be in excess of insured limits. The Company believes that the financial institutions that hold its cash deposits are financially sound and, accordingly, minimal credit risk exists with respect to these balances. With regard to customers, credit evaluation and account monitoring procedures are used to minimize the risk of loss. The Company believes that no additional credit risk beyond amounts provided for by the allowance for doubtful accounts are inherent in accounts receivable. No individual customer represented more than 10 percent of accounts receivable, net of allowance for doubtful accounts as of December 31, 2016 . As of December 31, 2017 , one customer represented approximately 13% of the Company's accounts receivable, net of allowance for doubtful accounts. For the years ended December 31, 2015 , 2016 and 2017 , no individual customer represented more than 10 percent of the Company’s total revenue. Property and Equipment, ne t Property and equipment, net is stated at cost, less accumulated depreciation and amortization. Depreciation and amortization is calculated on a straight-line basis over the estimated useful lives of those assets as follows: Computer hardware and software 2 to 5 years Internal-use software development costs 3 years Furniture and fixtures 2 to 7 years Leasehold improvements Shorter of the estimated lease term or useful life Maintenance and repairs are charged to expense as incurred. Deferred Costs The Company defers certain direct and incremental upfront costs related to the generation of a revenue stream or obtaining a new customer agreement. These costs include installment fees, activation and other telecommunication fees. The Company capitalizes these costs and amortizes them over the longer of the term of the customer contracts or the estimated customer life, which is approximately three years. Software Development Costs The Company capitalizes qualifying internal-use software development costs that are incurred during the application development stage. Capitalization of costs begins when two criteria are met: (i) the preliminary project stage is completed and (ii) it is probable that the software will be completed and used for its intended function. Capitalization ceases when the software is substantially complete and ready for its intended use, including the completion of all significant testing. The Company also capitalizes costs related to specific upgrades and enhancements when the expenditures will result in additional functionality and expenses costs incurred for maintenance and minor upgrades and enhancements. Costs related to preliminary project activities and post-implementation operating activities are expensed as incurred. Capitalized costs of platform and other software applications are included in property and equipment. These costs are amortized over the estimated useful life of the software on a straight-line basis over three years. Management evaluates the useful life of these assets on an annual basis and tests for impairment whenever events or changes in circumstances occur that could impact the recoverability of these assets. Debt Issuance Costs The Company incurred debt issuance costs associated with obtaining and entering into a five -year Credit and Security Agreement in November 2016, which includes a revolving credit facility and a term loan. These costs include non-refundable structuring fees, commitment fees, up-front fees and syndication expenses, which have been deferred and are being amortized based on the effective interest method over the term of the Credit and Security Agreement. The debt issuance costs associated with the revolving credit facility are recorded as a deferred cost in the accompanying consolidated balance sheets. The unamortized debt issuance costs, which are included in prepaid expenses and other current assets in the accompanying consolidated balance sheets, were $200 and $175 as of December 31, 2016 and 2017 , respectively. Debt issuance costs associated with the term loan were recognized as an adjustment of the yield of the loan and were reflected as a reduction of the long-term debt balance. As of December 31, 2016 and 2017 , unamortized debt issuance costs were $326 and $0 , respectively. On November 14, 2017, the term loan was paid in full and $260 of unamortized debt issuance costs were recorded as interest expense. Goodwill The Company reviews goodwill and indefinite-lived intangible assets at least annually, as of December 31, for possible impairment. Goodwill and indefinite-lived intangible assets are reviewed for possible impairment at an interim date if an event occurs or circumstances change that would more likely than not reduce the fair value of the reporting unit or indefinite-lived intangible asset below its carrying value. The Company tests goodwill at the reporting unit level and has determined that it has two -reporting units, CPaaS and Other. All Goodwill is allocated to the CPaaS reporting unit. Management may first evaluate qualitative factors to assess if it is more likely than not that the fair value of a reporting unit is less than its carrying amount and to determine if a two-step impairment test is necessary. Management may choose to proceed directly to the two-step evaluation, bypassing the initial qualitative assessment. The first step of the impairment test involves comparing the fair value of the reporting unit to its net book value, including goodwill. If the net book value exceeds its fair value, then the Company would perform the second step of the goodwill impairment test to determine the amount of the impairment loss. The impairment loss would be calculated by comparing the implied fair value of the goodwill to its net book value. In calculating the implied fair value of goodwill, the fair value of the entity would be allocated to all of the other assets and liabilities based on their fair values. The excess of the fair value of the entity over the amount assigned to other assets and liabilities is the implied fair value of goodwill. An impairment loss would be recognized when the carrying amount of goodwill exceeds its implied fair value. The Company makes assumptions regarding estimated future cash flows, discount rates, long-term growth rates and market values to determine each reporting unit’s and indefinite-lived intangible asset’s estimated fair value. If these estimates or related assumptions change in the future, the Company may be required to record an impairment charge. As of December 31, 2016 and 2017 , the Company has recorded goodwill of $6,867 . No goodwill impairment charges were recorded for the years ended December 31, 2015 , 2016 and 2017 . Impairment of Long-Lived Assets The Company evaluates long-lived assets, including property and equipment and definite lived intangible assets, for impairment whenever events or changes in circumstances indicate that the carrying amount of an asset may not be recoverable. Recoverability of assets held and used is measured by a comparison of the carrying amount of an asset or an asset group to estimated undiscounted future net cash flows expected to be generated by the asset or asset group. If such evaluation indicates that the carrying amount of the asset or the asset group is not recoverable, any impairment loss would be equal to the amount the carrying value exceeds the fair value. Advertising Costs The Company expenses advertising costs as incurred. Advertising costs totaled $329 , $197 and $464 for the years ended December 31, 2015 , 2016 and 2017 , respectively, which are included in sales and marketing expenses in the accompanying consolidated statements of operations. Commissions Commissions consist of variable compensation earned by sales personnel and third-party resellers. Sales commissions associated with the acquisition of a new customer contract are recognized as sales and marketing expense at the time the customer has entered into a binding agreement. Stock-Based Compensation The Company accounts for stock-based compensation expense related to stock-based awards based on the fair value of the award on the grant date. Stock-based compensation expense is recognized on a straight-line basis over the requisite service period, which is generally four years. The Company uses the Black-Scholes option pricing model, net of estimated forfeitures, to measure the fair value of its stock options. The Black-Scholes option pricing model requires the use of objective and subjective assumptions, which determine the fair-value of stock-based awards. These assumptions include: • Fair value of our common stock. Prior to the Company's IPO, the fair value of the shares of the Company's common stock underlying stock options has historically been established by the board of directors. Numerous objective and subjective factors that were considered included, but were not limited to, the following: i) contemporaneous independent, third-party valuations of the Company's common stock; ii) the rights, preferences and privileges of the Company's redeemable convertible preferred stock relative to those of the Company's common stock; iii) the Company's results of operations, financial position and capital resources; iv) current business conditions and projections; v) the lack of marketability of the Company's common stock; vi) the hiring of key personnel and the experience of the Company's management; vi) the introduction of new products; vii) the risk inherent in the development and expansion of the Company's products; viii) the fact that the option grants involve illiquid securities in a private company; ix) the likelihood of achieving a liquidity event, such as an initial public offering or a sale of the Company, given the prevailing market conditions; x) industry trends and competitive environment; and xi) overall economic indicators, including gross domestic product, employment, inflation and interest rates. After the IPO, the Company uses the market closing price of its Class A common stock as reported on the NASDAQ Global Select Market for the fair value. • Expected term. The expected term was estimated using the simplified method allowed under SEC guidance as the Company does not have sufficient historical data to use any other method to estimate the expected term. • Expected volatility. The expected volatility is derived from an average of the historical volatilities of the common stock of several entities with characteristics similar to those of the Company, such as the size, and operational and economic similarities to its principle business operations. The Company uses this method because it has limited information on the volatility of its common stock. • Risk-free interest rate. The risk-free interest rate is based on the yields of U.S. Treasury securities with maturities similar to the expected term of the options for each option group as of the grant date. • Expected dividends. The expected dividend is assumed to be zero as the Company has never paid dividends and has no current plans to pay any dividends on its common stock. In addition to the assumptions used in the Black-Scholes option pricing model, the Company must also determine a forfeiture rate to calculate the stock-based compensation for awards. Through December 31, 2017, the Company recognized compensation for only the portion of options expected to vest using an estimated forfeiture rate that was derived from historical employee termination behavior. If any of the assumptions used in the Black-Scholes option pricing model change, stock-based compensation for future options may differ materially compared to that associated with previous grants. Income Taxes The Company accounts for income taxes under the asset and liability method. Under this method, deferred tax assets and liabilities are determined based on temporary differences between the financial statement and tax basis of assets and liabilities using enacted tax rates. The Company recognizes the effect of a change in tax rates on deferred tax assets and liabilities in the period that includes the enactment date. The Company reduces the measurement of a deferred tax asset, if necessary, by a valuation allowance if it is more likely than not that it will not realize some or all the deferred tax asset. Quarterly, the Company reviews the deferred tax assets for recoverability based on historical taxable income, projected future taxable income, the expected timing of the reversals of existing temporary differences and the implementation of prudent and feasible tax planning strategies. The evaluation of the recoverability of deferred tax assets requires judgment in assessing future profitability. Should there be a change in the ability to recover deferred tax assets, the Company’s income tax provision would increase or decrease in the period in which the assessment is changed. The Company accounts for uncertain tax positions by recognizing the financial statement effects of a tax position only when, based upon technical merits, it is more likely than not that the position will be sustained upon examination. The tax benefit recognized is measured as the largest amount of benefit determined on a cumulative probability basis that the Company believes is more likely than not to be realized upon ultimate settlement of the position. The Company recognizes potential accrued interest and penalties associated with unrecognized tax positions in income tax expense. Operating Segments Operating segments are defined as components of an enterprise for which separate financial information is available and evaluated regularly by the chief operating decision maker (“CODM”) in deciding how to make operating decisions, allocate resources and in assessing performance. The Company has two operating segments, CPaaS and Other, which are deemed to be reportable segments. The Company’s CODM is its Chief Executive Officer. The CODM evaluates the performance of the Company’s operating segments primarily based on revenue and gross profit. The Company does not analyze discrete segment balance sheet information related to long-term assets, all of which are located in the United States. All other financial information is presented on a consolidated basis. Earnings (Loss) per Share Basic earnings (loss) per share attributable to common stockholders is calculated by dividing the net income (loss) attributable to common stockholders by the weighted-average number of shares of common stock outstanding for the period. Diluted net income (loss) per share is calculated by giving effect to all potentially dilutive common stock when determining the weighted-average number of common shares outstanding. For purposes of the diluted net income (loss) per share calculation, options and warrants to purchase common stock and redeemable convertible preferred stock are considered to be potential common stock. The Company has issued securities other than common stock that participate in dividends (“Participating Securities”), and therefore utilizes the two-class method to calculate net income (loss) per share. These Participating Securities include the Series A redeemable convertible preferred stock. The two-class method requires a portion of net income (loss) to be allocated to the Participating Securities to determine the net income (loss) attributable to common stockholders. Net income (loss) attributable to the common stockholders is equal to the net income (loss) less dividends paid on preferred stock with any remaining earnings allocated in accordance with the bylaws between the outstanding common and redeemable convertible preferred stock as of the end of each period. On November 9, 2017, the Participating Securities were converted into shares of Old Class A common stock, which converted to Class B common stock immediately prior to the IPO. Emerging Growth Company Status The Company is an “emerging growth company” as defined in the Jumpstart Our Business Startups Act (“JOBS Act”). The JOBS Act provides that an emerging growth company can take advantage of an extended transition period for complying with new or revised accounting standards. Thus, an emerging growth company can delay the adoption of certain accounting standards until those standards would otherwise apply to private companies. The Company has elected to avail itself of this extended transition period and, as a result, it will not adopt new or revised accounting standards on the relevant dates on which adoption of such standards is required for other public companies. Recently Adopted Accounting Pronouncements In March 2016, the Financial Accounting Standards Board ("FASB") issued Accounting Standards Update ("ASU") 2016-09, Compensation—Stock Compensation (Topic 718): Improvements to Employee Share-Based Payment Accounting . The effective date of ASU 2016-09 for private business entities is for fiscal years beginning after December 15, 2017. Early adoption is permitted and the Company adopted the amendments in ASU 2016-09 effective January 1, 2016. This standard simplifies several aspects of the accounting for equity-based payment awards, including the income tax consequences and classification on the statement of cash flows. Certain changes implemented by this standard are required to be applied retrospectively, while other changes are required to be applied prospectively. The Company elected to continue to estimate forfeitures when recording stock-based compensation expense. All excess tax benefits and tax deficiencies related to the year ended December 31, 2016 were recognized in income tax expense. Prior to the adoption of this standard, this amount would have been recorded as additional paid-in capital. This change could create future volatility in the Company’s effective tax rate depending upon the amount of exercise or vesting activity from stock based awards. The recognition of previously unrecognized excess tax benefits of $420 was recognized as a cumulative effect adjustment on a modified retrospective basis during the year ended December 31, 2016 . The Company recorded a deferred tax asset for previously unrecognized excess tax benefits outstanding as of the January 1, 2016, with an offsetting adjustment to accumulated deficit. In addition, cash flows related to excess tax benefits will no longer be classified as a financing activity apart from other income tax cash flows. The Company has adopted the change in presentation of excess tax benefits in the statements of cash flows on a prospective basis beginning in 2016. In November 2015, the FASB issued ASU 2015-17, Balance Sheet Classification of Deferred Taxes (Topic 740) , which requires that all deferred tax assets and liabilities, including any related valuation allowance, be classified as noncurrent on the balance sheet. ASU 2015-17 was effective for fiscal years beginning after December 15, 2016 for public entities, and early adoption is permitted. The Company elected to early adopt ASU 2015-17 beginning with the year ended December 31, 2015. In April 2015, the FASB issued ASU 2015-05, Customer’s Accounting for Fees Paid in a Cloud Computing Arrangement . This new standard, which provides guidance to customers about whether a cloud computing arrangement includes a software license, was effective January 1, 2016. If a cloud computing arrangement includes a software license, then the customer should account for the software license element of the arrangement consistent with the acquisition of other software licenses. If a cloud computing arrangement does not include a software license, the customer should account for the arrangement as a service contract. The Company adopted this standard on January 1, 2016. The adoption of this standard did not have a material impact on its consolidated financial statements. In April 2015, the FASB issued ASU 2015-03, Simplifying the Presentation of Debt Issuance Costs, which simplifies the presentation of debt issuance costs by requiring that such costs be presented in the consolidated balance sheets as a direct deduction from the carrying value of the associated debt instrument, consistent with debt discounts. Subsequent to the issuance of ASU 2015-03, the SEC staff announced that the presentation of debt issuance costs associated with line-of-credit arrangements may be presented as an asset. This announcement was codified by the FASB in ASU 2015-15. These ASUs were effective for the year ended December 31, 2016 , and the adoption did not have a material impact on the Company’s financial condition, results of operations or cash flows. In August 2014, the FASB issued ASU 2014-15, Disclosure of Uncertainties about an Entity’s Ability to Continue as a Going Concern , which provides guidance about management’s responsibility to evaluate whether there is substantial doubt about an entity’s ability to continue as a going concern and to provide related disclosures. ASU 2014-15 was effective for the year ended December 31, 2016 , and its adoption did not have a material impact on the Company’s financial condition, results of operations or cash flows. Recent Accounting Pronouncements Not Yet Adopted In May 2017, the FASB issued ASU 2017-09, Compensation-Stock Compensation (Topic 718), Scope of Modification Accounting , which amends the scope of modification accounting for share-based payment arrangements. The ASU provides guidance on the types of changes to terms or conditions of share-based payment awards to which an entity would be required to apply modification accounting under ASC 718, Compensation-Stock Compensation. ASU 2017-09 is effective for fiscal years and interim periods within those years beginning after December 15, 2017, and early adoption is permitted. The Company is evaluating the impact of this guidance on its consolidated financial statements and related disclosures. In January 2017, the FASB issued ASU 2017-04, Simplifying the Test for Goodwill Impairment , which simplifies the accounting for goodwill impairment. The ASU requires impairment charges to be based on the first step in today’s two-step impairment test. ASU 2017-04 is effective for annual and interim impairment tests performed in periods beginning after December 15, 2021, and early adoption is permitted. Management does not expect the adoption of this guidance to have any impact on the Company's financial position, results of operations, or cash flows. In January 2017, the FASB issued ASU 2017-01, Business Combinations (Topic 805) Clarifying the Definition of a Business , which amends the guidance of FASB Accounting Standards Codification Topic 805, “Business Combinations”, adding guidance to assist entities with evaluating whether transactions should be accounted for as acquisitions or disposals of assets or businesses. The definition of a business affects many areas of accounting including acquisitions, disposals, goodwill, and consolidation. This guidance is effective for annual and interim periods beginning after December 15, 2017, and early adoption is permitted under certain circumstances. The impact from the adoption of this standard is dependent upon future transactions. In August 2016, the FASB issued ASU 2016-15, Statement of Cash Flows (Topic 230), Classification of Certain Cash Receipts and Cash Payments, which clarifies how entities should classify certain cash receipts and cash payments on the statement of cash flows. The guidance also clarifies how the predominance principle should be applied when cash receipts and cash payments have aspects of more than one class of cash flows. ASU 2016-15 is effective for fiscal years beginning after December 15, 2018, and interim periods within fiscal years beginning after December 15, 2019, and early adoption is permitted. Entities will have to apply the guidance retrospectively, but if it is impracticable to do so for an issue, the amendments related to that issue would |