FWIW, if you read their official rules for refunds (link below), it says "Note: An iPhone purchased on the Apple Online Store is ineligible for return to an Apple Retail Store.". However, some folks have posted on here that they've been able to do that. In the event the store will switch you out, you're still dependent on the store having what you want in stock.
http://store.apple.com/us/help/returns_refund