Will my AT&T samsung magnet sim card work in an iPhone 3GS?

I plan on buying an iPhone 3GS and I want to make sure my current AT&T sim card will work with it before I make the purchase. It is a sim card with a pay as you go plan. Thanks in advance!

The iPhone cannot be used as a prepaid device