Hm, I don't know an exact answer, considering I've been with AT&T only since I got my first iPhone when they originally came out in '07, but try visiting your local AT&T store and see if you can possibly do a trade-in and pay for a refurbished iPhone 3G.
If they won't do it, a lot of times calling customer care can help, too, as if you explain a situation they tend to be more sympathetic and will try to help you out.