If you are registered to collect HST, then you know that you are responsible for sending in the HST for the period in which you make the sale. This often results in having to pay the HST to CRA before you have collected it from your customer. For years, people have been pointing out that this is not fair, which has not changed the tax law. However, if you can prove that the customer is not in fact ever going to pay your bill, then you are able to get a refund of the HST you sent in for this customer. You have to write the accounts receivable off on your books and you have to have made some effort to collect the money. Neither of these rules should be a big problem. I assume you want to collect your money so you have been repeatedly in contact with the customer and have not been able to get the money.
All of us would rather have the money from the client than receiving the deduction. If you have written off bad debts, but have not claimed the HST refund, then you should do so. There is a four year time limit from the time you do the write off to the time that you claim the HST, so don’t delay.