One stock that I felt might be an underdog last quarter was GoodRx Holdings (GDRX -7.20%). It looked to be a classic case of an overreaction, with investors heading for the exits after the company released a revenue warning. An issue with an unnamed grocer potentially heavily impacting its business led to a sharp sell-off.

The development didn't turn out to be all that catastrophic, and GoodRx could end up being an underrated stock to be holding right now, one that has a chance of outperforming the markets from here on out.

GoodRx says the issue with the grocer is resolved

GoodRx's business centers around helping consumers save money on prescription medication through its discounts. But in its shareholder letter back in May, the company cautioned that the actions an unnamed grocer took would impact the acceptance of GoodRx's discounts, and thus, sales would take a hit. 

Sales did end up declining in the most recent quarter, with revenue of $191.8 million for the period ending June 30, down 6% from the previous period. However, the good news is that the company said in this quarter's shareholder letter that it has resolved the issue with the grocer. Now, the company says that it expects its discounts should be "consistently welcomed at the point of sale."

However, GoodRx says the impact likely won't be seen in the third quarter as it'll take time for the communication to roll out to the grocery's pharmacies about the changes. As a result, GoodRx projects that its third-quarter sales will decline to $185 million.

But once the fourth quarter hits, GoodRx could be in an excellent position to post much stronger numbers, especially with subscription sales looking impressive lately.

Subscription revenue soars 82%

GoodRx's basic service is free to customers; they don't have to pay to use the company's coupons. However, the company does offer GoodRx Gold, which costs a monthly fee and promises even more savings. GoodRx raised those prices recently, which led to a surge in subscription revenue, jumping from $14.3 million in the prior-year period to $26 million in Q2. The price of the most expensive Gold plan, the family plan, increased from $9.99 to $19.99 per month.

The big question is whether there will be a decline in memberships following these increases (existing Gold subscribers only saw the higher prices this past quarter) and if the bump in revenue was simply because subscribers were caught off guard, or if this is a sign that customers see the value in the service and that it is worth keeping. If it's the latter, that would be a promising development that could lead to even better sales numbers for the company once the effects of the grocer issue are fully behind the business.

Why GoodRx could be a good buy right now

Year to date, GoodRx shares have cratered 78%, which is far worse than the S&P 500 (it's down 10%). And there have been plenty of reasons for investors to be bearish on the stock: Its business isn't profitable, it traded at more than 15 times its sales, its growth rate has been falling, and the grocer issue didn't help.

However, the future looks brighter for the stock because it now trades at a more modest four times revenue. Its discounts could be in high demand as consumers look for ways to save money amid a downturn in the economy and rising inflation. The growth rate could improve now that GoodRx's troubles with the grocer could potentially be behind it, plus strong subscription sales could fuel some even better numbers. And while the business isn't profitable, GoodRx generates positive cash flow from its operations ($81 million through the past six months) and has plenty of cash on its books (approximately $731 million). That's arguably more important than accounting losses that non-cash items can often weigh down.

There's some risk with GoodRx, but much of the negativity looks to have already been priced in. Now, with a more favorable outlook on the future, GoodRx has the potential to surprise investors later this year, and it could be one of the better healthcare stocks to buy today.