Almost not a technical question

I would like to develop a paying system like does. For those
who don't know about groupon, you can purchase coupon only if the coupon
as been sold "n" number of times. But when you pay you are charged only
if the limit number of people has been reached.
This means then save somehow your credit card number somewhere and
charged you when the sell is done.

My question is how, where do they do their paying thing?


I would imagine most if not all payment gateways (e.g.
allow a "Authorization Only" submittal; the card is only actually charged
with a subsequent "Prior Authorization Capture" using a transaction id
or some other token, which means there's no need to retain the actual
card data on the site (a very good thing!).