Currently there is no way to update customer credits on their accounts or on their orders. There is a way to create / update RMAs for customers, but the associated credits need to be entered into cPanel by hand.
This presents huge issues when handling refunds and credits at scale. Could we please get the functionality added to the API routes for customers?