Accessing A Customer’s Credit Balance

Hello! I’m about to add a credits system to my online shop, but I want to be sure that customers have credits before I allow them to access certain features. Is there a way I can access the current user’s credit balance from either the WordPress backend or from the Front End with Javascript? Thanks!