Hope this is not too offtopic.
I read everywhere that Agile development is against having a contract
with a fixed price from the beginning and that it's better to work
with the client in small iterations.
The problem with "fixed price" is that the scope of a project is rarely so well-defined that such a price can be reasonably determined. The client wants to get as much as possible for the money they've agreed to spend, while the developer wants to minimize the total effort to deliver the project.
I have one question though, when do we start talking price with the
VERY early in the process. You might need to have a non-billable discussion of the total project and what the initial deliverable will be before you can even start discussing price.
At the end of each iteration?
Well, you want to make sure that the delivered functionality is acceptable...
At the beginning of each iteration?
... based on the scope and estimated effort agreed to at the start of the iteration.
Does the client have to pay me at the end of each iteration? Or do we talk about price at the end of the project only?
How you're paid and the timing of payments is somewhat independent of the rate/price, but I'd suggest having a regular invoice cycle (per iteration). The idea with an agile methodology is that after just a couple iterations, the client should be able to accurately gauge the value receive for his/her money with each new iteration and thus be empowered to make the decision whether to stop ("the project is now good enough" or "that's all I can spend right now") or continue with another iteration ("that's great, but now let's add ..."). You should be adding value with each iteration and that's when you should be paid.
Thanx in advance
You might find the Craig Ambrose's Freelancing on Rail podcast (http://www.craigambrose.com/podcasts) helpful.
Rob Biedenharn http://agileconsultingllc.com