There can be multiple reasons why a refund fails. To get more information on why the refund failed, check the message returned by the gateway for the failed refund:
Go to the customers' dashboard->payments
Click details on the failed refund payment in question
The Authorization response field will contain the error message that was returned by the gateway.
A common but unclear reason is that the payment is older than 60 days (or another limit from the gateway). A refund must be issued through the gateway itself or against a more recent payment to get around this. If refunded in the gateway, you must also record the refund in Stax Bill as cash, check, or direct deposit. It could also be that the customer has issued a chargeback or a refund occurred outside of Stax Bill.
If the payment method is ACH or EFT, Stax Bill will not know if the refund request has failed or succeeded.