How can store credit be added as a payment method?

How can store credit be added as a payment method?

To let a customer pay with store credit, add the customer to the sale and checkout. The option to pay using store credit will be enabled in the payment screen.