Change or update an order

The normal and recommended integration is to use Hips.js on your checkout page below the cart. Should the user choose to change anything in the order that in this stage is already created, you should do the following:

  1. User changes quantity of a product in your cart on the checkout page.
  2. Call Hips.checkout.suspend(); to avoid that the customer checkout and pay without the new quantity is calculated in the total amount.
  3. Update the order in your system, then call the HIPS API Update Order to make sure Hips have the updated order.
  4. When finished, call Hips.checkout.resume(); to reload and resume the checkout with the new data.
<script>  
    function change_something(){
      Hips.checkout.suspend();
      example_ajax('/change', function(){
        Hips.checkout.resume();
      });
    }
  </script>