A common error we see with IRD payday filing is where FlexiTime accounts are connected to the wrong myIR accounts, or to an account that doesn't have access to do payday filing. When we try to file your pay we get an 'Unauthorised Delegation' error returned from the IRD, essentially saying that the myIR account isn't allowed to file the return.
If you're a new company, ensure that you are registered as an employer with the IRD.
Just because you were previously able to file monthly returns on the IRD website doesn't mean you have the correct permissions for payday filing - there is a bit of a disconnect between the old system and the new system in this regard. On March 1 2018, IRD made a change that further restricted who was able to do payday filing. If your myIR login does not have the 'owner' role then you will need to get the owner to grant you new access. This article explains how to go about this. Alternatively, use the myIR login with the owner role when you connect FlexiTime to IRD.
Another common way this comes about is where you are automatically logged in by IRD to the latest myIR account you used. You may have been logged into your personal myIR account or a myIR account for another company. Then when you do the authorisation step in FlexiTime, instead of going to the login page for IRD, you're automatically logged in to the previous company and so the link is going to the wrong place.
To correct you should go to Setup > Company Settings > Connect, and Disconnect from payday filing, then authorise again. If you're still automatically logged in (so aren't prompted for a myIR username and password) then you should open a new window, go directly to myIR, then explicitly log out. Now repeat the authorisation from FlexiTime, and this time you'll have to log in to myIR.
If you're a tax agent, ensure that the myIR user you are using has filing access for the company.
Finally, check that the IRD number entered for the company under Setup > Company Settings is correct.
Once you've resolved the issue you should resend any pays for the current period to IRD. View the pay and under Options you can select Resend to IRD.