By Krystal Hu

(Reuters) – Shopify Inc has divested the logistics arm it built over the past few years, in a reversal of its strategy of aggressively investing in fulfillment networks, the Canadian e-commerce platform said on Thursday. It has sold its logistics unit, including Deliverr Inc, a company it acquired for $2.1 billion less than a year ago, to freight forwarder Flexport in an all-stock deal in exchange for a 13% stake in the startup it has previously invested in.

The company on Thursday also said it would let go 20% of its staff, its second round of large layoffs within a year. It also reported stronger-than-expected earnings. Shopify shares were up

nearly 20% in early trading on Thursday.

Shopify has also sold 6 River Systems, another retail fulfillment automation startup it paid $450 million for in 2019, to British online supermarket technology provider Ocado for an undisclosed amount, the company said. The move to expand into logistics services was part of Shopify’s ambition to support merchants selling on its platform with one-stop service.

As the e-commerce boom brought by the global pandemic subsides and Shopify’s revenue growth slows, its spending in the fulfillment network has been more closely scrutinized by investors, who worry the capital-intensive project could weigh on earnings. Shopify President Harley Finkelstein said the shift in strategy was a result of prioritizing product acceleration. “We can give our merchants great value. Flexport gets tons of new customers to use their incredible product and we can go back to focusing on what we do best,” he said in an interview.

San Francisco-based Flexport will expand into fulfillment and last-mile delivery through the deal as the official logistics partner for merchants on Shopify. Flexport, led by former Amazon executive Dave Clark, will provide fulfillment services to stores and homes through over 50 fulfillment sites across the country following the deal, competing head to head with Inc. “We want to move toward end-to-end solution under one technology stack, from manufacturer to store door, and this really accelerates our journey there,” Clark said. “We expect to use this as a real catalyst for growth.”

Flexport was last valued at $8 billion in a $935 million funding round led by Andreessen Horowitz and MSD Partners in February 2022.

(Reporting by Krystal Hu in New York; Editing by Jamie Freed and Jane Merriman)