Within Payment Gateway, you may have to process refunds after a Payment has already been made to the "Payment Provider". This is currently only available for 'Stripe' or 'Opayo' transactions.
To do this, firstly find the entry for the payment within the "Payment Gateway Log".
The Payment Amount column represents the payment amount (including VAT) that was taken and sent to the Payment Provider and the Refunded Amount shows how much was actioned by the refund (also including VAT).
In the example above, you can see that '£120' was sent to the Payment Provider of 'Stripe' and no refund has yet been processed. With the entry line selected, click into Payment in the ribbon and select Create Refund.
A screen similar to the Payment Gateway payment screen will open, showing the original details from the Source Document such as Customer No, Related Entry No and Source No. All of this information cannot be changed.
Within the Refund Reason section is a dropdown where you can click and confirm the reason code you want to use for this transaction. As mentioned in the Refund Reasons article, Stripe will allow you to pick from the 3 defaulted Reason Code options and Opayo will allow you to choose one of your own Reason Codes you have created. Opayo MUST have a Provider Reason populated but Stripe can be left blank if you wish.
Within the Refund Document section, you can confirm which document you want Business Central to create as part of the refund process. These are handled in the same way as standard Business Central processes so creating a Return Order will create a Sales Credit Memo automatically once posted and Credit Memo will open a Credit memo document only. Only when this document is posted will the refund be acknowledged in the "Payment Gateway Log".
Within the Lines FastTab, all the lines that appeared on the Source Document will be automatically shown.
Here, you can see the original Qty for the line is stated in the Refund Quantity column but this can be changed to reflect the real qty you want to refund per item. You also need to add in the amount you want to refund the item for in the Refund Amount column. This value will be the amount before VAT as VAT will be taken into account on the Return/Credit memo automatically. To help with this, you can see the Original Amount and the Original Amount Including VAT per line it was originally processed as from the Sales Order.
Once the Refund Quantity and Refund Amount has been edited, press OK to proceed.
This will then open the Refund Document you chose (either "Return Order" or "Sales Credit Memo") which can be handled and processed as per standard Business Central practises.
Checking the same Entry No within the "Payment Gateway Log" now shows the Refunded Amount which can be drilled down into taking you to the "Payment Gateway Refund Log".
When the refund document is posted, this simply prepares the refund entry ready to be processed by the Payment Provider. It still has to be sent to the Payment Provider to confirm the refund.
Prior to this, the Request Status is blank for the entry. The Provider Response Status shows as 'Pending' to confirm that this is still waiting to be finalised.
To send this to the Payment Provider and finalise the refund, in the ribbon of the "Payment Gateway Refund Log", click on Payment and choose Process Refund.
If successful, this will update the Request Status to 'Ok' and the Provider Response Status to 'Success'. If this fails (which will most likely be because the information within the "Payment Provider Account" is incorrect or there is an issue with the Web Service URL in "Payment gateway Setup").
Once the Status is 'OK' and has been a success, the Payment Provider will show a refund within their Stripe/Opayo account.
This process handles the refund with the Payment Provider. The refund document can be paid within Business Central via the "Cash Receipt Journal" in the same way the Invoices are paid. More information on this can be found here.
NOTE: When you post the Refund document (Return Order or Credit Memo), the "Payment Gateway Log" will be updated with a Refunded Amount, using 'Todays' date as the refunded date. This is crucial as when applying entries automatically in the "Cash Receipt Journal" when using the Suggest Pmt gateway Payment function, if the Posting Date for the Sales Order/Invoice and the Return Document are dated PRIOR to the Refunded date, the entries will not be automatically applied. This is because Payment Gateway doesn't acknowledge a refund before the sales documents. They can however, be manually applied in the "Cash Receipt Journal" if required.