Excellent question. As a developer, I suggest asking for everything. But some clients have asked this exact same question, and two things that have worked for me have been:
1. Agree on a %-age of the money as a 'hold back.' The client pays within a set period, e.g. 30 days, if there have been no problems or when all problems are resolved. I wouldn't agree to more than 10% hold-back, personally, but it isn't a big issue.
2. Agree that for each deliverable, there is a milestone for "accepted" where the client tests it on your development or acceptance system, and another for "deployed." There is a payment for each milestone. There could be other milestones leading up to "acceptance," of course, and there would be payments for each of these.
1. Agree on a %-age of the money as a 'hold back.' The client pays within a set period, e.g. 30 days, if there have been no problems or when all problems are resolved. I wouldn't agree to more than 10% hold-back, personally, but it isn't a big issue.
2. Agree that for each deliverable, there is a milestone for "accepted" where the client tests it on your development or acceptance system, and another for "deployed." There is a payment for each milestone. There could be other milestones leading up to "acceptance," of course, and there would be payments for each of these.