To get a Clearance Certificate, you will have to go through the Canadian Revenue Agency (CRA) but in most cases, a lawyer or an accountant can apply for a Clearance Certificate for you. With this certificate you will be able to take the proceeds of the sale out of the country.
Things to keep in mind:
Through this process, the CRA will be checking up on your affairs, making sure you do not owe any back taxes in Canada & they will release this certificate to you within 8-12 weeks.
What can happen is your transaction can close and move over to the next owner, but the lawyer at closing will tend to hold back around 1/3 of the proceeds in a holding account until your Clearance Certificate arrives. In that case, the proceeds won't be released to you for another 2-3 months.
This only becomes an issue if the remaining 2/3 of the proceeds is not enough to cover your remaining mortgage. At that point, you can apply for a Hardship Clearance Certificate & that will fast track the certificate process, enabling you to close on the property and allowing you to pay out your mortgage.
If you have any questions about obtaining a Clearance Certificate from the Canadian Revenue Agency, the best thing to do is speak to your local accountant in Whistler and they can explain it clearly to you. Hope this helps!