Shopify's (SHOP 0.23%) stock rallied about 40% over the past 12 months as the e-commerce services company impressed investors with a streak of earnings beats. However, two recent announcements caused Shopify's stock to stumble.

First, Facebook's (META -4.13%) Instagram launched in-app checkouts, which will initially be offered by more than 20 brands -- including Nike, Zara, Warby Parker, and Uniqlo. The feature lets users store their credit card or PayPal (PYPL 0.34%) information on Instagram to make streamlined purchases from a brand's posts.

A tiny shopping cart filled with tiny parcels on a laptop keyboard.

Image source: Getty Images.

Shortly afterward, Square (SQ -2.28%) integrated Weebly, the website and online store builder it acquired last year, into its Square Online Store, which lets merchants sell products through their own digital storefronts, and Square for Retail products, its in-store POS (point-of-sale) app.

These moves indicate that Facebook and Square could steal business away from Shopify, which digitizes offline businesses with a suite of tools for building websites, processing orders and payments, launching marketing campaigns, maintaining customer relationships, and more. But can either of these challengers actually dent Shopify's growth?

Check out the latest earnings call transcripts for Facebook, PayPal, Shopify.

Understanding Facebook's strategy

Facebook repeatedly tried to leverage its position as the world's largest social network to expand into the e-commerce market, but none of those efforts helped it gain much ground against Amazon.

But Facebook isn't giving up. It launched shoppable posts on Instagram and pop-up stores for digitally native businesses, and it tested out a video platform that let merchants sell products through real-time streaming videos. Instagram was also rumored to be developing a stand-alone shopping app, but the subsequent departures of its founders cast doubts on those plans.

Instead, Facebook likely wants to tighten the bonds between its own business pages and Instagram, which topped a billion monthly active users (MAUs) last year. More than 90 million small businesses use its family of products (Facebook, Messenger, WhatsApp, and Instagram), so it's smart to usher retailers toward Instagram to sell their products through shoppable posts.

Instagram claims that 130 million people tap its shoppable posts every month. That represents a small slice of its total MAUs, but it's enough to merit the introduction of in-app checkouts. Shopify currently facilitates a "very small" percentage of payments on Instagram's shoppable posts, according to RBC analyst Ross MacMillan. MacMillan warns that Instagram's new system "circumvents" Shopify's and will throttle its ability to profit from Instagram's future growth.

Shoppable posts on Instagram.

Image source: Instagram.

This strategy locks brands and shoppers into Facebook's ecosystem -- which could boost the relevance of Facebook's business pages, encourage them to buy more ads on Facebook and Instagram, and enable it to roll out other Shopify-like services.

Understanding Square's strategy

Square started out as a payments processor, but its ecosystem now includes tools for managing customer relationships, maintaining payrolls, analyzing business data, tracking inventories, delivering and catering food (via Caviar and Zesty), and designing websites and online stores -- thanks to its purchase of Weebly.

Simply put, Square aspires to become a "one-stop shop" for companies that want to digitize their businesses. Therefore, it wasn't surprising when Square finally integrated Weebly into its core products to compete more effectively against Shopify.

Square and Shopify started out in different markets, but the two rivals are now using similar strategies. Both companies offer small businesses loans through financing arms (Square Capital and Shopify Capital), both process payments, and both are trying to lock in customers with expanding portfolios of sticky enterprise services.

Last quarter, Square's subscription and services revenue rose 112% annually after excluding its acquisitions of Weebly and Zesty. With those two acquisitions factored back in, its subscription and services revenue jumped 144%. That revenue contribution is significant, but the acquisitions of Weebly and Zesty also allow Square to expand its ecosystem into Shopify's and Grubhub's backyards, respectively.

Should Shopify investors worry?

Shopify is arguably still the "best in breed" play in digitizing offline businesses, and concerns about competition (like Adobe's (ADBE -1.73%) acquisition of Magento) frequently rock the stock -- possibly due to its lofty forward P/E ratio of nearly 230.

I don't think Facebook's and Square's latest moves will impact Shopify's near-term growth any more than the Adobe-Magento deal. But over the long term, those competitive threats could evolve as Shopify's growth decelerates -- which could make it harder to justify the stock's premium valuation.