How to update the cart totals block when a customer enters credit points?

I have tried applying custom discount fee on cart totals block. I need to update the cart block on some event when user enters credit points which then deducts amount, update cart block adn show final grand and sub-total. How do I go about it ? Please check below link for a clear picture

You can implement it similar to the coupons.