(Bloomberg) -- Shopify Inc. plans to spend $1 billion to set up a network of fulfillment centers in the U.S. to help merchants using its e-commerce platform deliver products more quickly and cheaply, much the way Amazon.com Inc. does.

“A large number of orders are lost in the final stages due to complex shipping costs,” Craig Miller, Shopify’s chief product officer, said at the company’s annual developer conference in Toronto. The service will use machine learning to predict demand and suggest closest fulfillment centers to merchants.

The Ottawa-based company unveiled the plan, along with new features such as video and 3D modeling for products, the ability edit orders and a better user interface. It also added 11 new language capabilities and rolled out a multi currency payments system to all merchants. It’s planning a new point of sale system for later this year.

Its shares jumped 4% to a record $316.22 at 12:25 p.m. in New York.

Shopify processes millions of individual sales by hundreds of thousands of merchants every year. The company could potentially pool shipments from different online stores together, making shipping cheaper and more efficient. Storing products from different merchants in centralized warehouses would also bring down costs for sellers and buyers alike, and net Shopify another revenue stream.

That could help the company mount a defense against Amazon, which ruthlessly lowers prices and encourages merchants to use its own warehouses and shipping tools.

The online platform, which celebrity Kylie Jenner uses to sell cosmetics, is the top-performing stock in Canada this year. It’s also outperformed any stock in the S&P 500 over that time, other software services companies such as Square Inc. and Amazon.com Inc.

The company has been rallying after reporting strong first quarter earnings, forecasts for second quarter revenue that were above expectations and pushing plans to expand internationally. Shopify posted its first annual revenue above $1 billion in 2018. The company is rated a buy by 18 analysts, a hold by 8 and a sell by two, according to ratings compiled by Bloomberg.

But Facebook’s addition of features on its Instagram app that allows consumers to pay for items without leaving the social platform, could steal market share from Shopify, which currently provides that service.

Increasing competition has helped fuel short sellers such as Citron Research, which has also voiced concern in the past about Shopify’s merchant volume and churn among small sellers.

--With assistance from Gerrit De Vynck.

To contact the reporters on this story: Simran Jagdev in Toronto at sjagdev1@bloomberg.net;Paula Sambo in Toronto at psambo@bloomberg.net

To contact the editors responsible for this story: Jillian Ward at jward56@bloomberg.net, ;Jacqueline Thorpe at jthorpe23@bloomberg.net, Molly Schuetz

©2019 Bloomberg L.P.