Fix SagePay Error Code 4020: Step By Step Solution

Updated On: August 11, 2025 10:02 am

Fix SagePay Error Code 4020

Why SagePay Error Code 4020 Occurs?

SagePay Error Code 4020 is one of the most common errors users encounter in the SagePay software. This error message indicates that the user has not yet entered the IP address for the web server on the SagePay Administration Site. In this case, the system triggers an error message to alert the user. SagePay only accepts the IP address of servers that have been previously registered for the site, which connects directly via either Server or Direct integration. Several reasons can lead to this error, and identifying the root cause is key to resolving it.

Essentially, Error 4020 is not related to the Sage Pay (Opayo) matching set extension. This means the IP address used to send payment details is not correct or not approved by Sage Pay (Opayo). The error happens when the IP sending the payment request is not added to the allowed list in Opayo.
When this error shows up, Sage Pay cannot process payments. You might also see slow system performance or other unexpected issues. This issue is generally easy to resolve manually—simply log in to your “My Sage Pay” account, click on “Settings,” confirm the IPs, and enter the server’s IP address.

To make the process easier, we’ve outlined the possible causes of Sage Pay Error 4020 along with the most effective troubleshooting steps to fix it. 

Accounting Professionals & Specialized Experts

Want quick help from accounting software experts? Get in touch with our team members who can install, configure and configure your software for you. Proficient in fixing technical issues, they can help you quickly get back to work whenever you encounter an error in Sage software. Our team is available 24/7 365 days to assist you. To get in touch.

If the error persists even after entering the IP address in SagePay, we recommend contacting our SagePay experts directly. Our Sage helpdesk professionals are highly skilled and can resolve such issues efficiently and promptly.

To make the process easier, we’ve outlined the most effective troubleshooting steps to fix it along with possible causes of Sage Pay Error 4020.

Also Read: Sage Pay Error Codes and its Cause with Solution

How to Fix SagePay Error Code 4020?

SagePay Error Code 4020 happens when the system detects an invalid or unknown IP address. The main fix is to add the correct IP address to your Sage Pay account. Follow these steps to troubleshoot and resolve the issue:

  • Verify Your Internet Connection

Make sure your internet connection is stable:

  1. Restart your router or modem.
  2. Use a more reliable network if possible.
  3. Try using Sage Pay again. If the error continues, move to the next step.
  • Add Missing IP Address to the Sage Pay Control Panel

A missing or unapproved IP address is the most common cause of Error 4020. To add the correct IP:

  1. Open Command Prompt (CMD) on the system sending the transaction.
  2. Type: ping [your Sage Pay domain or site URL] and press Enter.
  3. Copy the IP address shown in the response.
  4. Log in to the Sage Pay Control Panel.
  5. Go to the section for managing IP addresses.
  6. Add the copied IP address.
  7. Save the changes and try the transaction again.
  • Run a System Restore

System changes or conflicts may cause the error. Restoring the system can help fix it:

  1. Log in with an administrator account.
  2. Go to:
    Start Menu > All Programs > Accessories > System Tools > System Restore
  3. Select “Restore my computer to an earlier time” and click Next.
  4. Select the latest restore point that occurred before the error started.
  5. Follow the on-screen steps to complete the restore.
  6. Restart your system once done.
  • Get the Correct IP Address via Simulator Mode

If Sage Pay still blocks the IP, use the Sage Pay Simulator to get the right one:

  1. Create a Sage Pay Simulator Account.
  2. In your Magento Admin Panel, go to:
    System > Configuration > Sales > SagePay > Sage Pay Suite
  3. Enter the Simulator Vendor in the correct field.
  4. Enable Simulator Mode using either:
    1. Sage Pay Suite [DIRECT Integration]
    2. Sage Pay Suite [SERVER Integration]
  5. Save the settings.
  6. Run a test transaction. Sage Pay will detect and register the correct IP address automatically.
  • Disable Firewall or Antivirus

Your firewall or antivirus might block Sage 50 Pay from accessing the internet:

  1. Temporarily disable your firewall and antivirus.
  2. Check if the error resolves.
  3. If it does, add Sage 50 Pay to your firewall’s exception list to avoid future issues.
  • Reconfigure Network Settings

Continued appearance of the error may signal a deeper network configuration issue:

  1. Contact your IT administrator or network expert.
  2. Reconfigure DNS, proxy, or firewall settings with expert help to avoid system problems.

Also Read: How to Fix Sage Integration Service Error 14101?

Why Sage 50 Pay Error 4020 Occurs: Invalid IP Address?

Sage Pay Error Code 4020 typically occurs due to issues related to IP address recognition and network configuration. Here are the most common causes:

Missing or Incorrect IP Address Entry

    The most common reason is that your web server’s IP address is not added to the Sage Pay (Opayo) Admin Site. Transactions are only allowed from approved IPs. If the address doesn’t match, you’ll get the 4020 error.

    Network Connectivity Issues

      A weak internet connection or wrong network settings can break the link between your server and Sage Pay. Make sure your internet is stable and network settings are correct.

      Conflicts After Software Updates

        Updates to Sage 50 Pay or other connected software can reset or change IP settings. After an update, check that your IP address is still listed correctly and nothing was changed or removed.

        Firewall or Security Software Blocking Access

          Firewalls, antivirus tools, or other security software may block Sage Pay by mistake. Check your firewall settings and whitelist Sage Pay to allow proper access.

          Aftermath of Sage 50 Error 4020

          When Sage Pay shows Error 4020 in Sage 50, it can cause the following problems:

          • The transaction process stops, and the Sage 50 Pay feature no longer works.
          • The system may crash, or Windows may stop responding to the mouse and keyboard.

          About Sage 50 Pay

          SagePay, now called Opayo, is a payment service provider that offers secure and reliable transaction processing. Commonly used across Europe, it helps businesses manage payments safely. Opayo supports smooth cash flow by providing fast and secure payment options, making it a popular choice for e-commerce platforms.

          Final Words

          Hopefully, you are no longer encountering SagePay Error Code 4020 and have successfully resolved the issue manually. If the error persists, you can take advantage of our email, online, or toll-free support services. Our technical experts can fix the SagePay error, regenerate your vendor name, and repair the IP address in case of a 4020 error.

          Frequently Asked Questions:

          What are the symptoms of SagePay Error Code 4020?

          Following are the symptoms of SagePay Error Code 4020:

          1. System failures might have a direct impact on Sage Pay.
          2. Because users are unable to register their IP addresses, it is not feasible to access a Sage Pay account directly because the IP address is not registered.

          Can My Sage Pay, result in SagePay Error Code 4020?

          Yes, My Sage Pay, can result in SagePay Error Code 4020, The aforementioned problem occurs when the IP address used in the webshop function does not recognize the My Sage Pay accounts sites. It is critical for the IP address to contain My Sage Pay account pages, but it does not, resulting in error number 4020.

          After you Fix SagePay Error Code 4020 using an advanced User solution, how to Restart your System to get the Error successfully resolved?

          To restart your system to get the error successfully resolved, follow the steps that are mentioned below: 

          1. First, hold down the control (Ctrl), Alternate (Alt), and delete (Del) keys on your keyboard at the same time.
          2. After that, you need to wait for a new menu or window to emerge once you release the keys.
          3. Then you need to click the Power symbol in the lower right corner of the screen.
          Finally, choose either Shut Down or Restart.

          How can an IP Address be the reason behind SagePay Error Code 4020?

          When a user fails to enter the web server’s IP address then the IP Address can be the reason behind SagePay Error Code 4020. Because it only takes the server’s IP address that is registered for the site, the entire procedure should be completed on the Sagepay Administrative Site.

          What are some other error codes in the Sage Pay application?

          Here are some frequently encountered error codes in the Sage 50 Pay (Opayo) application:

          Incorrect XML: Indicates issues in the XML structure or formatting used in the request.
          4020: Request for user authentication; often due to an unregistered or invalid IP address.
          2180: Unable to delete the user from the system.
          2212: Error while recording transactions, possibly due to data mismatch or system issues.
          1002: Authentication failure, often due to incorrect login credentials.
          401: User authentication request appears in a prompt window; usually access-related.
          1017: Transaction not permitted, typically caused by restricted card types or user settings.
          3004: Incorrect amount entry; value may be out of acceptable range or invalid format.
          2261: Negative surcharge figure entered, which is not allowed in the system.

          Is Error 4020 related to network settings?

          Yes, network restrictions, firewall configurations, or incorrect IP settings can contribute to this error.

          How do I register my IP address with Sage Pay?

          Log in to your Sage Pay (Opayo) admin panel, navigate to the Valid IPs section, and add your system’s IP address. This ensures Sage Pay recognizes your connection as trusted.

          Related Posts

          Further Reading