This is something to work out with the bike shop. Make sure you have a clear understanding of the arrangement.

When I was buying my first bike, one shop wanted to charge a nonrefundable fee (can't remember how much but it was something like $100) for ordering a bike my size for me to try. And we were talking a pretty common bike in a pretty common size. They would apply the fee to the purchase price if I purchased it but wouldn't even credit it to the purchase price of a different bike at their shop. Another branch of the same store offered to just get it for me to try.

Fortunately, I found a shop that 1) had a different policy and 2) had the size in stock so it was a non-issue. This was the shop I preferred to have as "my" bike shop, so it worked out for the best. I purchased both that bike and my next bike from them as well.