Put it on your Starbucks card. But we're not talking about one of those gift cards.

The coffee king has a new idea to fight slowing sales -- its own Visa credit card. It'll help you build Starbucks rewards even if you're using it to buy stuff outside of the coffee shops.

Starbucks (SBUX) announced the new Starbucks Rewards Visa Card Thursday. It's backed by JPMorgan Chase (JPM). Starbucks first hinted last year that a new co-branded card was coming soon.

Customers can use the card at Starbucks as well as other stores that accept Visa (V), and they can earn points, dubbed Stars (why not Bucks?), that can be redeemed for drinks and food at more than 8,000 Starbucks locations nationwide.

Cardholders will also become members of the company's Starbucks Rewards loyalty program, which already has more than 14 million people signed up.

The card will have an annual fee of $49. People who apply for the card will get a physical piece of plastic within 7-10 days of getting approved for the card. They will also get a digital version of the card immediately loaded into the Starbucks mobile app.

But Starbucks said that it and JPMorgan Chase (JPM) are also working on a co-branded prepaid debit card that will launch later this year. That could attract consumers who have poor credit histories or are wary of adding on more debt.

Related: What's wrong with Starbucks?

Any moves that can potentially boost sales at Starbucks would be welcomed by investors. The company needs a caffeine jolt.

Revenue growth has started to slow in the United States. Starbucks said in its fourth quarter earnings report that sales at U.S. stores open at least a year rose just 2% -- below analysts' expectations.

CEO Kevin Johnson, who took over for Howard Schultz last year, told analysts during a conference call that demand for the company's limited-time holiday beverages, gift cards and other merchandise "did not resonate with our customers as planned."

Starbucks is also having trouble attracting new customers. All its same-store sales growth in the United States came from customers spending more. The number of actual transactions in the fourth quarter was flat.

Shares of Starbucks fell more than 4% on the disappointing earnings report and the stock is now down for the year -- missing out on the hot start for the broader market so far in 2018. Starbucks stock is also down slightly since Johnson succeeded Schultz.

Meanwhile, the S&P 500 is up 20%, while Starbucks' rival Dunkin' Brands (DNKN) has gained nearly 20% and the resurgent McDonald's (MCD), which has added more premium coffee beverages to its menu lately, has soared more than 30%.