This is exactly how Stripe works. Except you don't even need the credit card info at all, even initially – Stripe handles that.
Now that's currently only online, but they're releasing a point of sale product soon too. But even with that, you connect to their card reader and receive a token that you can use.
Now that's currently only online, but they're releasing a point of sale product soon too. But even with that, you connect to their card reader and receive a token that you can use.