Editor's Note: This article was originally published on Real Money at 2:12 p.m. on June 16.

Costco Wholesale (COST - Get Report) will switch to Visa (V - Get Report) credit cards in four days, marking the end of its 17-year alliance with American Express (AXP - Get Report) . This means American Express cards will no longer be accepted at Costco as of Monday. Both Costco and Visa are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio.

The partnership between Costco and American Express evolved and expanded since 1999. The companies launched two co-branded cards -- the American Express Costco Cash Rebate Credit Card and the American Express Costco Business Card.

Eventually, the two co-branded cards became four: TrueEarnings Card from Costco and American Express, American Express Costco Platinum Cash Rebate Card, TrueEarnings Business Card from Costco and American Express, and American Express Costco Business Card.

But last year, Costco announced a new agreement with Visa after negotiations with American Express did not work out. "We were unable to reach terms that would have made economic sense for our company and shareholders," said American Express in a statement.

Costco and Visa are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells COST or V? Learn more now.

In a May interview with CNBC, Charlie Munger, vice chairman of Berkshire Hathaway (BRK.A - Get Report) (BRK.B - Get Report) , expressed that American Express may have made a mistake. "I think Costco is so powerful that being the only credit card provider in Costco is so valuable that they should have thrown away the rulebook," said Munger.

So with AmEx out, Costco turned elsewhere, finding Visa and Citigroup (C - Get Report) .

Under the terms of the new deal, Citi becomes the exclusive issuer of Costco's co-branded credit cards and Visa will replace American Express as the credit card network.

The wholesale retailer stopped issuing American Express co-branded cards in the fall of 2015, according to BMO Capital Markets analysts.

Furthermore, the switch to Visa will save Costco millions of dollars. In a Feb. 18 research note, the BMO analysts said they "estimate the savings from lower interchange fees could amount to $110 million to $220 million." They noted that American Express' typical interchange fee is in the 190- to 200-basis-points range and they expect Visa/Citi to charge closer to 130 to 140 bps on average.

The analysts highlighted that they "expect Costco to reinvest the vast majority of the interchange fee savings," anticipating the savings to be put toward additional services, rewards or benefits.

In March, Jack Mohr, research director for Jim Cramer's Action Alerts PLUS portfolio, said the new Visa card "offers perks that are significantly greater than legacy AmEx, which in turn should incentivize spending across all Costco locations."

The new Costco Anywhere Visa Card by Citi comes with the so-called "4-3-2-1 rewards," according to BMO Capital market analysts, and all purchases will earn members Costco cash rewards. To break it down, the "4" stands for 4% cash back on eligible gas worldwide (this does include gas at Costco). Members will earn 3% cash back on restaurant and eligible travel purchases worldwide. They will also get 2% cash back on all other purchases from Costco and Costco.com, and 1% cash back on all other purchases.

These rewards are different from what American Express offered members. For the TrueEarnings Card, it was more of a 3-2-2-1 plan: 3% cash back at U.S. gas stations and gas at Costco up to $4,000 per year in purchases (then 1%); 2% cash back at U.S. restaurants; 2% cash back on eligible travel purchases; and 1% cash back on other purchases, including at Costco.

The upcoming changeover should be seamless, as members do not have to apply for a new account and the new card will arrive in the mail. Another non-cash-back perk that Mohr pointed out: acceptance of Visa credit cards is much higher worldwide compared to AmEx.

Mohr's bottom line: the deal creates a mutually beneficial relationship for Costco, its members and Visa alike. Action Alerts PLUS is bullish on both Costco and Visa for the long term.