Like all digital goods, the marginal cost of MSFT doing this is zero. I don't think they are losing money on this, in terms of pure margins, its probably quite lucrative (though in absolute revenue, maybe not so much).
Credit card processing is not a digital good, per se. Microsoft has to pay Visa and Mastercard their x% + y cents, and has to deal with returns and fraud and whatnot. Which is not to say that they're losing money, but this isn't the true zero-marginal-cost scenario like a Google web search.
Truly though in accounting terms I think it falls under fixed negotiated cost and not marginal the fees are known and negotiated as a flat rate and adjusted gross selling prices reflects that so selling more goods does not increase the price of that cost