I do this but I don't pay immediately. I pay by the last day possible to not incur interest. I still get the benefit of using credit and building my good credit, but I also get the benefit of having my money stay in my accounts, earning money for me up to when I have to pay off the balance, and in the meantime, I've gotten the use from my purchase. In effect, I get to eat free, temporarily, from anywhere from 28 to 56 days, depending on when in my billing cycle I bought the meal. I can buy a physical item and get to use it for the same range of time before I actually have to pay for it.
That is the beauty of using credit when you have the cash to make the purchase. A side benefit is having a printable record of all purchases, which can help with budgeting and preparing tax returns.