Upon completion of a website or web app, how can the client and contractor exchange payment and deliverables securely? If the developer sends the final product over to the client, how can they be sure that they will receive payment. Lawsuits to collect payments would not be worth the money on smaller projects. This also goes for the inverse, if the developer sends payment, how can he guarantee he will receive the product?
The safest way is to conduct the transaction via a 3rd party trusted by both the client and the service provider (which is the reason places like eLance and Odesk exist). If you've conducted business outside such matching websites, you can use a payment platform like Paypal where they buyer has certain recourse for getting a refund if the purchased item is not up to their expectations.
In all these cases they buyer pays first, then the final product is shipped. (And if you think about it, that's the same process that all online sales are handled for products from "big box" stores - eBay, Amazon, etc - they don't ship until the buyer pays!)
If your client is reticent about making the final payment before you ship, you should find out what his/her objections to paying you are.