so my item should have come today in the post i got a text saying that my item needs to be redelivered
i clicked the nz post link and it took me to www.nzpost.co.nz/tools/missed-my-parcel i enter my info and then clicked next they asked for a redeliver fee i checked the url and its was still www.nzpost.co.nz
then asked me to pay a fee put debit card then it came up a visa site saying i should get a text code to confirm the payment and enter it but i never entered it because they tried to charge me $200 the item i bought was around $18
the website url was legit so has nz post had there site hacked whats going on?
i would call nz post but they would be closed now

There's your first mistake. Go to the NZ Post website, don't trust links you've been sent.
There's your second mistake. Be very wary of anyone asking for money when you're not expecting it. At this point I'd be calling their 0800 number.
Definitely sounds like a scam: you managed to avoid it at the very last gate, however they potentially now have your debit card number, expiry and CVC, meaning that they could still bill your card if they can do it without tripping the bank's red flags (as you did with the code).
Put a freeze on the card until you're 100% sure it wasn't a scam.