How to set up subscription service with credits that visitors can use to buy products?
The Drupal Commerce site builder's guide refers to modules named Commerce Credits and Commerce Credits Transactions for building sites with a "store credit" feature.

However, these modules seem to be unmaintained and aren't covered by Drupal.org security policies, so you would need to evaluate the value of using them in your integration vs the risk of having to support a site using them without much help.