It gets refunded after cancellation. Expedia refunds it, so it just a few days (not a few weeks like airlines). Not all flights though, during booking you can see that 'free cancel in 24 hours' tag next to the valid offers. You can cancel online just with a few clicks after booking.