You are here

What do your XML error codes mean?

If there's a problem with an XML request you're sending to us, we'll often respond with an error message to tell you what's happened. The most common error codes are shown below, along with their messages.

How do we send the error response?

Errors are displayed in our XML response as part of the <error> element. Here's an example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN"
  "http://dtd.WorldPay.com/paymentService_v1.dtd">
<paymentService version="1.4" merchantCode="ExampleCode1"> <!--The merchantCode you supplied originally-->
  <reply>
    <error code="2">
      <![CDATA[The XML couldn’t be parsed against the DTD]]>
    </error>
  </reply>
</paymentService>

 

What do the different error codes mean?

Error code number Error type Comments
1. Internal error, a general error The request couldn’t be processed - please contact Worldpay for further assistance. 
2. Parse error, invalid XML The XML couldn’t be parsed against the DTD. Ensure that the request conforms to the DTD, and that it's validated using an industry standard parser before submission to Worldpay. 
3. The amount is invalid.  
4. Security violation This error response is generated for one of these reasons:
  •     The login name (i.e. the merchant code used in the authentication process to access the payment service) doesn't match the merchant code in the root element <paymentService>
  •     You are submitting a payment from an IP address that is not registered against your account
  •     The environment to which you are submitting the transaction is not active, i.e. the account hasn't been activated in production
5. The contents of the order element are invalid. Examine the returned error message within the CDATA tag to determine the exact cause. 
6. One or more orders within a batch submission are invalid.  
7. The contents of the payment element are invalid. Examine the returned error message within the CDATA tag to determine the exact cause.
8. Service not available. The service is currently unavailable.


For more information about specific error messages, see the Troubleshoot part of the XML API Integration guide.