On Wednesday, Shopify Inc (SHOP  ) topped estimates with its second quarter results. The Canadian e-commerce rival of Amazon (AMZN  ), Etsy Inc (ETSY  ) and Wayfair Inc (W  ) enjoyed strong demand despite "a mixed consumer spend environment."

Its rival Etsy missed estimates with second quarter net income and pulled its fourth quarter guidance because of an unpredictable macroenvironment. Etsy also sees the upcoming election to be another distraction for the weakened consumer. Even the mighty e-commerce titan such as Amazon spoke of a cautious consumer as its online sales were a bit short of estimates. Although Amazon reported its online sales grew 5%, growth has slowed down from previous quarter's 7% growth rate. Last but not least, even Amazon provided a cautious guidance.

Second quarter financials For the quarter ended on June 30, Shopify reported revenue grew 20.7% to $2 billion, fueled by more spending on Shopify powered commerce websites with gross merchandise volume rising 22% YoY.

Rising from 58% from last year's comparable quarter, 61% of Shopify's payment volume is now processed by its internal payment systems, which come with a higher take rate.

Shopify hiked prices of monthly subscription fees, and a testament of its impressive pricing power subscription is the fact that revenue grew 26.8% YoY to $563 million.

What is perhaps most impressive is the fact Shopify significantly improved its profitability while investing in its growth. Over the past year, the operating margin reached the positive shore after last year's losses and free cash flow margin more than doubled on a YoY basis as it amounted to 16%. During the quarter, Shopify generated more $333 million, which means it generated more than $1 billion in free cash flow over the last 12 months.

Shopify reported a second quarter net income of $171 million or 13 cents per diluted share while adjusted earnings amounted to 26 cents per share.

Third Quarter Guidance

Shopify guided for YoY revenue growth from low-to-mid-20s percentages. FactSet analysts expected YoY growth of 21% YoY to $2.07 billion.

The macroeconomic is challenging, but Shopify is doing a good job at navigating it.

Like Amazon, Etsy and Wayfair, Shopify also noted consumers being cautious about their spending. But with a diverse set of businesses, its merchants managed to navigate the slowdown.