When adding a return, if you want to issue a credit memo to the customer in QuickBooks Online, simply check the Create credit memo box on the return. SOS will generate the credit memo and sync it to QuickBooks. The amount used is the total Credit amount of all line items on the return.
For each line item, the credit amount is initially based on the unit price. How the return is created affects the Unit price value initially added to the return.
The total Credit amount can be found just below the line item area.
If you need to give a customer partial credit on a return or are charging them shipping or other fees, create an item to represent the customer fees. In the item definition, set the Type to Service or Non-inventory, and keep the Always shippable box checked. Then you can add it to the return transaction.
The sample return RTN2098 below shows how to enter this information on the transaction.

Although the Credit amount entered for the Medical Tube item is for the full 250.00, the total credit due to the customer is offset by a Freight Charge and a Restocking Fee, which the customer is responsible for.
So that the Credit amount accurately deducts the charges for those line item entries, the Unit price for both Freight Charge and Restocking Fee have been entered as negative numbers:
The total Credit amount given to the customer for this sample transaction is 250.00 - 35.00 - 5.00 = 210.00