Has it ever happened to you that you spent some good time implementing things, and then showed your creation to the user only to find out that it was not exactly what they wanted?
Or suddenly it turns out that they do not remember something they said and you have implemented it according to what you thought they had said.
To avoid such surprises, put everything in black and white.
Do a profound analysis. Write an outline of what the program will do, what screens and reports you will create. Let this be reviewed by the end user.
Obtain a formal agreement from the user. This can be a hand written signature or simply a confirmation email.
Just make sure that you have something to show him or others to prove what you agreed on.