Debt | Debt The table below summarizes the carrying amount and weighted average interest rate of the Company’s debt (in thousands, except percentages): September 30, 2018 December 31, 2017 Carrying Amount Interest Rate Carrying Interest Note payable to Shanghai Pudong Development Bank $ — $ 17,000 4.10 % Note payable to China CITIC Bank — 17,000 4.00 % Notes payable to suppliers 3,634 — 1,607 Total notes payable and short-term borrowing $ 3,634 $ 35,607 Long-term debt, current and non-current: Borrowing under Wells Fargo Credit Facility $ 35,630 4.51 % $ 30,018 3.29 % Mitsubishi Bank loans 11,206 1.05% -1.45% 16,924 1.05% -1.45% Mitsubishi Bank and Yamanashi Chou Bank loan 6,942 1.1 % — Unaccreted discount and issuance costs within current portion of long-term debt (161 ) (86 ) Unaccreted discount and issuance costs within long-term debt, net of current portion (463 ) (295 ) Total long-term debt, net of unaccreted discount and issuance costs $ 53,154 $ 46,561 Reported as: Current portion of long-term debt $ 2,798 $ 6,005 Long-term debt, net of current portion 50,356 40,556 Total long-term debt, net of unaccreted discount and issuance costs $ 53,154 $ 46,561 Notes payable and short-term borrowing The Company regularly issues notes payable to its suppliers in China. These notes are supported by non-interest bearing bank acceptance drafts issued under the Company’s existing line of credit facilities and are due three to six months after issuance. As a condition of the notes payable arrangements, the Company is required to keep a compensating balance at the issuing banks that is a percentage of the total notes payable balance until the amounts are settled. As of September 30, 2018 , the Company’s subsidiary in China had three line of credit facilities with the following banking institutions: • Under the first line of credit facility with Shanghai Pudong Development Bank, the Company can borrow up to RMB 120.0 million ( $17.5 million ) for short-term loans at varying interest rates, or up to approximately RMB 240.0 million ( $34.9 million ) for bank acceptance drafts (with up to 50% compensating balance requirement). This line of credit facility expires in July 2019. In November 2017, the Company borrowed $17.0 million under this line which bore interest at 4.1% . The amount of $17.0 million under this line was repaid in May 2018. • Under the second line of credit facility with Shanghai Pudong Development Bank, which expires in July 2019, the Company can borrow up to RMB 30.0 million ( $4.4 million ) for short-term loans at varying interest rates, or up to approximately RMB 60.0 million ( $8.7 million ) for bank acceptance drafts (with up to 50% compensating balance requirement). • In December 2017, the Company's subsidiary in China entered into a third line of credit facility with China CITIC Bank in China, which expires in November 2018. The purpose of the credit facility is to provide short-term borrowings, bank acceptance drafts and letters of credits. Under this credit facility, the Company can borrow up to approximately RMB 250 million ( $36.4 million ) at varying interest rates, or up to approximately RMB 390.6 million ( $56.9 million ) for bank acceptance drafts (with up to 36% compensating balance requirement). In February 2018, the Company borrowed $17.0 million under this line which bore interest at 4.7% . The amount of $17.0 million under this line was repaid in August 2018. The Company had a line of credit facility previously with China CITIC Bank in China which expired during September 2017. In July 2017, the Company borrowed $17.0 million under this line which bears interest at LIBOR plus 2.55% . The amount of $17.0 million under this line was repaid to CITIC Bank in January 2018. Under these line of credit facilities, the non-interest bearing bank acceptance drafts issued in connection with the Company’s notes payable to its suppliers in China, had an outstanding balance of $3.6 million and $1.6 million as of September 30, 2018 and December 31, 2017 , respectively. In addition to the outstanding notes payable, three letters of credit totaling $1.6 million were issued to its suppliers in 2016 for equipment purchases delivered by December 2016. These letters of credit required a 30% compensating balance. As of December 31, 2016, the outstanding balance of these letters of credit was immaterial and was fully repaid as of December 31, 2017. As of September 30, 2018 and December 31, 2017 , compensating balances relating to these bank acceptance drafts and letters of credit issued to suppliers and the Company’s subsidiaries totaled $1.9 million and $0.5 million , respectively. Compensating balances are classified as restricted cash on the Company’s condensed consolidated balance sheets. In China, when there is a case pending in judicial court, banks may choose to limit borrowing against existing credit lines, regardless of the legitimacy of the case. The Company has a dispute pending with APAT OE in judicial court (See Note 11). The Company does not expect to make any additional draws against its credit facilities in China until this matter is resolved. Credit facilities The Company had a credit agreement, as amended, with Comerica Bank as lead bank in the U.S. (the “Comerica Bank Credit Facility”) with a borrowing capacity of up to $30.0 million . In January 2017, the Company amended the Comerica Bank Credit Facility to extend the maturity to April 30, 2017 and to remove the covenant related to EBITDA. In April 2017, the Company amended the Comerica Bank Credit Facility to extend the maturity date to July 31, 2017 and to add a financial covenant that required maintenance of a modified EBITDA. In June 2017, the Company amended the Comerica Bank Credit Facility to extend the maturity to August 31, 2017, to allow NeoPhotonics China to borrow up to $17.0 million , to limit the indebtedness under the facility to $20.0 million and to modify the EBITDA requirement. In August 2017, the Credit Facility was further amended to extend the maturity to September 30, 2017. Borrowings under the Comerica Bank Credit Facility bore interest at an interest rate option of a base rate as defined in the agreement plus 1.75% or LIBOR plus 2.75% . The base rate was the greater of (a) the effective prime rate, (b) the Federal Funds effective rate plus one percent, and (c) the daily adjusting LIBOR rate plus one percent. In September 2017, the Company entered into a revolving line of credit agreement with Wells Fargo Bank, National Association ("Wells Fargo") as the administrative agent for a lender group (the "Wells Fargo Credit Facility" or "Credit Facility"), and the amount outstanding under the Comerica Bank Credit Facility was paid in full. The Wells Fargo Credit Facility provides for borrowings equal to the lower of (a) a maximum revolver amount of $50.0 million , or (b) an amount equal to 80% - 85% of eligible accounts receivable plus 100% of qualified cash balances up to $15.0 million , less certain discretionary adjustments ("Borrowing Base"). The maximum revolver amount may be increased by up to $25.0 million , subject to certain conditions. At closing, $50.0 million was available, of which $30.0 million was drawn. The Company used $20.0 million of this amount to pay the principal and interest due under the Comerica Bank Credit Facility, which has since been terminated. The Credit Facility matures on June 30, 2022 and borrowings bear interest at an interest rate option of either (a) the LIBOR rate, plus an applicable margin ranging from 1.50% to 1.75% per annum, or (b) the prime lending rate, plus an applicable margin ranging from 0.50% to 0.75% per annum. The Company is also required to pay a commitment fee equal to 0.25% of the unused portion of the Credit Facility. The Credit Facility agreement ("Agreement") requires prepayment of the borrowings to the extent the outstanding balance is greater than the lesser of (a) the most recently calculated Borrowing Base, or (b) the maximum revolver amount. The Company is required to maintain a combination of certain defined cash balances and unused borrowing capacity under the Credit Facility of at least $20.0 million , of which at least $5.0 million shall include unused borrowing capacity. The Agreement also restricts the Company's ability to dispose of assets, permit change in control, merge or consolidate, make acquisitions, incur indebtedness, grant liens, make investments and make certain restricted payments. Borrowings under the Credit Facility are collateralized by substantially all of the Company's assets. The Company was in compliance with the covenants of this Credit Facility as of September 30, 2018 . As of September 30, 2018 , the outstanding balance under the Credit Facility was $35.6 million and the weighted average rate under the LIBOR option was 4.51% . The remaining borrowing capacity as of September 30, 2018 was $14.4 million , of which $5.0 million is required to be maintained as unused borrowing capacity. The Company repaid $5.0 million in October 2018, which was borrowed in September 2018. Mitsubishi Bank loans On February 25, 2015, the Company entered into certain loan agreements and related agreements with the Bank of Tokyo-Mitsubishi UFJ, Ltd. (the “Mitsubishi Bank”) that provided for (i) a term loan in the aggregate principal amount of 500 million JPY ( $4.4 million ) (the “Term Loan A”) and (ii) a term loan in the aggregate principal amount of one billion JPY ( $8.8 million ) (the “Term Loan B” and together with the Term Loan A, the “2015 Mitsubishi Bank Loans”). The Mitsubishi Bank Loans are secured by a mortgage on certain real property and buildings owned by the Company’s Japanese subsidiary. Interest on the 2015 Mitsubishi Bank Loans accrues and is paid monthly based upon the annual rate of the monthly Tokyo Interbank Offer Rate (TIBOR) plus 1.40% . The Term Loan A required interest only payments until the maturity date of February 23, 2018, with a lump sum payment of the aggregate principal amount on the maturity date. The Term Loan B requires equal monthly payments of principal equal to 8,333,000 JPY until the maturity date of February 25, 2025, with a lump sum payment of the balance of 8,373,000 JPY on the maturity date. Interest on the Term Loan B is accrued based upon monthly TIBOR plus 1.40% and is secured by real estate collateral. In conjunction with the execution of the Bank Loans, the Company paid a loan structuring fee, including consumption tax, of 40,500,000 JPY ( $0.4 million ). The Term Loan A of 500 million JPY (approximately $4.4 million ) was repaid to the Mitsubishi Bank in January 2018. The 2015 Mitsubishi Bank Loans contain customary representations and warranties and customary affirmative and negative covenants applicable to the Company’s Japanese subsidiary, including, among other things, restrictions on cessation in business, management, mergers or acquisitions. The 2015 Mitsubishi Bank Loans contain financial covenants relating to minimum net assets, maximum ordinary loss and a dividends covenant. Outstanding principal balance for Term Loan B and unamortized debt issuance costs were approximately 641.7 million JPY (approximately $5.6 million ) and 71.0 million JPY (approximately $0.6 million ), respectively, as of September 30, 2018 . The Company was in compliance with the related covenants as of September 30, 2018 and December 31, 2017 . In March 2017, the Company entered into a loan agreement and related agreements with the Mitsubishi Bank for a term loan of 690 million JPY (approximately $6.1 million ) (the “2017 Mitsubishi Bank Loan”) to acquire manufacturing equipment for its Japanese subsidiary. This loan is secured by the manufacturing equipment acquired from the loan proceeds. Interest on the 2017 Mitsubishi Bank Loan is based on the annual rate of the monthly TIBOR rate plus 1.00% . The 2017 Mitsubishi Bank Loan matures on March 29, 2024 and requires monthly interest and principal payments over 72 months commencing in April 2018. The loan contains customary covenants relating to minimum net assets, maximum ordinary loss and a dividends covenant. The Company was in compliance with these covenants as of September 30, 2018. The loan was available from March 31, 2017 to March 30, 2018 and 690 million JPY (approximately $6.1 million ) under this loan was fully drawn in March 2017. Mitsubishi Bank and Yamanashi Chou Bank loan In January 2018, the Company entered into a term loan agreement with Mitsubishi Bank and The Yamanashi Chou Bank, Ltd. for a term loan in the aggregate principal amount of 850 million JPY (approximately $7.5 million ) (the “Term Loan C”). The purpose of the Term Loan C is to obtain machinery for the core parts of the manufacturing line and payments for related expenses by the Company's subsidiary in Japan. The Term Loan C is secured by the assets owned by the Company's subsidiary in Japan. The Term Loan C was available from January 29, 2018 to January 29, 2025. The full amount of the Term Loan C was drawn in January 2018. Interest on the Term Loan C is based upon the annual rate of the three months TIBOR rate plus 1.00% . The Term Loan C requires quarterly interest payments, along with the principal payments, over 82 months commencing in April 2018. The Term Loan C loan agreement contains customary representations and warranties and customary affirmative and negative covenants applicable to the Japanese Subsidiary, including, among other things, restrictions on cessation in business, management, mergers or acquisitions. The Term Loan C loan agreement contains financial covenants relating to minimum net assets and maximum ordinary loss. The Company was in compliance with these covenants as of September 30, 2018. As of September 30, 2018 , maturities of total long-term debt were as follows (in thousands): 2018 (remaining three months) $ 740 2019 2,959 2020 2,959 2021 2,959 2022 38,589 Thereafter 5,572 $ 53,778 |