Tagging on final instalment

Does anyone know any way you can automatically add a tag on payment of a final instalment?

To clarify we use different instalment plans 2, 3, and 6 depending on costs of a specific course,
<£100 1 or 2 instalments
<£299 1 or 3 instalments

£300+ 1, 3 or 6 instalments

We want to avoid people being able to take the course exam until last payment is collected (so they don’t qualify then do a runner). So need some kind of release tag to send them the link after final payment. Because people can choose different payment plans for same course we can’t add the tag a set time after purchase so wondered if anyone knew of a workaround?