add backend user service and jQuery ajax to ask for resource
get the credit info using jQuery ajax
use javascript promise to retrieve the data from server
extract methods
use catch to catch error