how to update the order total in checkout page?
You need to use hook_form_alter().

First, for integrity purposes, write a validator that will ensure all amounts are correct, and if not - update them &amp; show form to user again.

Second - use AJAX. Drupal allows only for one callback, so your new one will have to take care of calling the original one in the first place, and you may have some problems if you will need to replace more than one form element, but it can be done.