It seems pretty random to me ... I would probably probably double check that the code has not been used yet when you create it with very little chance that you will get a duplicate number.
And, most likely, the chances of a repeat are a little more than 1 in 36 ^ 8, or about 1: 2,821,109,907,456.
Note that since SHA1 returns sixteen digits in a hexadecimal string, if you want them to be less likely to duplicate, you can always just increase your substrate from (0.7) to (0.29) (you may go even a little higher, but I doubt that you want this large number)
But I agree that you should have some unique coupon identifier stored in some database to make sure you don't have duplicates, and it would be a great way to find out how many coupons you created (and maybe how many got? = D)
source share