Generally, a voluntary statement to police isn't immediately unlawful, but its use in court is a tricky matter. The essential factor is whether it was obtained fairly. Officers must adhere to specific procedures, https://panchanandshaw.com/blog/costs-imposed-by-court-explained/