Usually, you would refund orders by logging in to your Opayo account, but with our AG SagePay Opayo (Formerly SagePay) – WooCommerce Gateway plugin, you can process the refunds inside your WooCommerce dashboard.
Here are the steps to do it:
Navigate from your WordPress dashboard > WooCommerce > Settings > Payments > AG Opayo (Formerly SagePay) Server and Click Manage.
Enter your Opayo password and the Opayo user that you have received from Opayo into the fields below:
Navigate from your WordPress dashboard > WooCommerce > Orders and select the order that you wish to refund.
After selecting the order, you should see the refund button labeled “Refund via AG SagePay.”
Click the said refund button, and it should process the refund without any issues.
When you process a refund via WooCommerce, our plugin makes two API requests to the Opayo platform.
The first API request is to https://live.sagepay.com/access/access – where we need to make a request to this Opayo endpoint to get the RelatedSecurityKey for the order that is being refunded. The payload for this request is the user, password, vendor, command, and the vpstxid (Transaction ID).
This then gives us the RelatedSecurityKey.
After receiving the RelatedSecurityKey, the plugin then makes another API call to https://live.sagepay.com/gateway/service/refund.vsp which is the refund request, with this we need to pass over the RelatedSecurityKey as part of the payload, then the refund should be processed if all the required data are correct.
Was this helpful?
Our team are on hand to provide fast, helpful and professional support.
Welcome to our AG Bot, powered by OpenAI and trained on our documents and product pages. By continuing to use this service, please keep in mind: