How have you configured the store order summary server behavior? You should be able to specify a session variable to hold the id for the record. This session variable should then have the id for the inserted record and you should be able to use this session variable anywhere that you would like to see the order id. Please post back with the confirm page in question minus any of the sensitive details so that we can take a look.