This is how touch and go the SolarCity IPO was

The IPO of solar installer SolarCity (s SCTY) — one of the only successful IPOs to come out of the cleantech and clean energy sectors in 2012 — was so touch and go that in the 11th hour the team decided to shelve the IPO and at one point even booked tickets to fly back to San Francisco from New York, according to SolarCity CEO Lyndon Rive during a talk at the Cleantech Investor Summit on Thursday.

Rive said that it was only after they booked their tickets to go home that they ended up confirming with two institutional investors that the investors wouldn’t sell if they saw weakness in the stock on the debut day. After that, it was “game on,” said Rive.

Late 2012 was a difficult time to go public for a solar company, to say the least. Dozens of solar manufacturing companies had gone bankrupt over the year, due to rock bottom solar cell prices. Even though SolarCity is an installer and financier, and not a manufacturer, Wall Street was hesitant to support any type of solar IPO. As a result, during SolarCity’s roadshow it had to reprice its estimated IPO price range from $13 to $15 per share down to $8 per share.

SolarCity actually had a term sheet ready for a private round valuing the company at $8 per share, said Rive in his talk. The company was ready to raise money privately if it couldn’t get the valuation it wanted when going public. And even though it had a private round that matched their eventual IPO price, if it went public and the stock tanked from $8 down to $5 in IPO morning trading, “it would have devastated the company,” said Rive.

But SolarCity went for it and took a chance. It helped that the company’s current investors, Elon Musk, DBL Investors and DFJ, agreed to buy a bunch of shares in the offering. On the morning of the debut, SolarCity’s shares soared 40 percent in morning trading.

Though, SolarCity was the exception last year. Rive told the audience of cleantech investors and entrepreneurs that for any of the cleantech companies looking to go public in 2013, be forewarned: “it’s not easy.”