What happened

Shares of Shopify (SHOP 0.19%) climbed higher on Wednesday, surging as much as 9.4%. As of 12:32 p.m. ET, the stock was still up 7.3%.

While a general market rebound no doubt aided its ascent, the biggest catalyst that sent the e-commerce platform provider higher was its financial report, which wasn't as bad as many had feared.

So what

For the second quarter, Shopify reported revenue that grew to $1.3 billion, up 16% year over year. A significant strengthening of the U.S. dollar weighed on the top line, which would have been 1.5% higher if not for the currency headwinds. Skyrocketing costs pressured profits, resulting in an adjusted net loss of $38.5 million, or a loss per share of $0.03. 

To put those results in context, analysts' consensus estimates had been calling for revenue of $1.3 billion and earnings per share of $0.02. 

Gross merchandise volume (GMV), which represents the value of products sold on its e-commerce platform, of $46.9 billion increased 11% year over year, though Shopify noted this represented a three-year compound annual growth rate of 50%.

The biggest contributor to the loss was spiraling costs. Sales and marketing, research and development, and general and administrative costs surged 61%, 89%, and 67%, respectively, eating into the company's profits.

The results come in the wake of a tough day for Shopify investors. On Tuesday, the stock dropped 14% as the company revealed it would lay off 10% of its workforce. In a missive to employees and shareholders, CEO Tobi Lütke admitted that the e-commerce growth spurred by the pandemic had reversed course, something Shopify hadn't bargained for.

Now what

Shopify expects the pain to continue "for the foreseeable future," as the one-two punch of inflation and rising interest rates will continue to weigh on consumer spending. As a result, Shopify is guiding for an adjusted operating loss in the second half, with a third-quarter loss that will "materially increase" compared with the second quarter. The news wasn't all bad, as the company expects its operating loss in the fourth quarter to be "significantly smaller" than what it expects in Q3. 

E-commerce growth will continue, albeit at a slower pace, and Shopify is repositioning its business to adjust to the changing landscape.