update id after creating a transaction