You generally account for output VAT when you raise an invoice rather than when your customer pays you. If you are not subsequently paid then you can reclaim bad debt relief where:
If you claim bad debt relief and later receive payment, you must refund the appropriate amount.
If, on the other hand, you are a late payer, then you will need to repay any input VAT reclaimed on unpaid invoices. You are considered a late payer if you do not pay for supplies within six months of the later of the date of the supply or the due date of payment. You need to repay the VAT regardless of whether the supplier claims bad debt relief or not.
Within VAT ...
Within Running a business ...
General…