Skip to content

    Exceptions

    Exceptions

    If something goes wrong when communicating between your system and Netaxept or in the middle of the payment process, Netaxept declines the transaction and returns an exception. All exceptions contain an error which in turn contains a message. All error codes are listed on the page Response codes.

    For the Rest API, all exceptions are wrapped in an <Exception> root element that contains a single <Error> element. The type (xsi:type) of the <Error> element indicates which exception it is. All <Error> elements contains a <Message> tag that provides a textual description of what failed. For example:

    <Exception xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Error xsi:type="TYPE_OF_EXCEPTION">
        <Message>Some textual description of the error</Message>
      </Error>
    </Exception>

    The string "TYPE_OF_EXCEPTION" in the example above is some of the exceptions listed below on this page, for example "AuthenticationException".

    AuthenticationException

    If credentials are missing or if the Merchant ID and Token sent to Netaxept do not match the information found in Netaxept, an AuthenticationException will be returned. The AuthenticationException is usually a result of wrong configuration at the merchant side, or sending production information, like credentials, to the test environment, or vice versa.

    Below is an example of this error when using the Rest API:

    <Exception xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Error xsi:type="AuthenticationException">
        <Message>Test: Unable to authenticate merchant (credentials not passed)</Message>
      </Error>
    </Exception>

    BBSException

    The BBSException can contain the following fields / elements:

    FieldDescription
    MessageProvides a textual description of what failed.
    ResultIndicates the exact error. The fields returned inside the Result element vary depending on the case and operation done. It is recommended to log at least the ResponseCode, ResponseText and ResponseSource fields for future reference. Read more about response codes.

    Below is an example of this error when using the Rest API:

    <Exception xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Error xsi:type="BBSException">
        <Message>Unable to auth</Message>
        <Result>
          <IssuerId>3</IssuerId>
          <ResponseCode>98</ResponseCode>
          <ResponseText>Transaction already processed</ResponseText>
          <ResponseSource>Netaxept</ResponseSource>
          <TransactionId>1bah7d2c43ba4c31a4d99fb54e82fb4f</TransactionId>
          <ExecutionTime>2017-07-26T07:18:02.2679391+02:00</ExecutionTime>
          <MerchantId>123456</MerchantId>
          <ExtraInfoOut>1010010</ExtraInfoOut>
          <MaskedPan/>
          <MessageId>81f558663d154d26be7b7a52b8c448d6</MessageId>
        </Result>
      </Error>
    </Exception>

    GenericError

    The GenericError is returned when no other exceptions are suitable.

    Below is an example of this error when using the Rest API:

    <Exception xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Error xsi:type="GenericError">
        <Message>Unable to find transaction</Message>
      </Error>
    </Exception>

    MerchantTranslationException

    The MerchantTranslationException indicates that the merchant has not been correctly registered for the current usage. If you get this exception, please contact Nets customer support for your country.

    NotSupportedException

    The NotSupportedException indicates that an operation you are trying to do is not supported under the current conditions. For example if you attempt to run the Process (Credit) call for an AutoReg-transaction, or attempt to use the Process (Auth) or Process (Capture) call with direct bank payments that support only Process (Credit) calls, you will receive NotSupportedException.

    Below is an example of this error when using the Rest API:

    <?xml version="1.0" encoding="utf-8" ?>
    <Exception xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Error xsi:type="NotSupportedException">
        <Message>This method is not supported for this payment method.</Message>
      </Error>
    </Exception>

    SecurityException

    Number of filters has been implemented in Netaxept to prevent fraud. Some of these filters return the SecurityException if certain conditions are met. The error message provides a textual description of what failed. However, due to security matters, it is not always possible to return any clear description of the failure. In these situations, please contact Nets customer support for your country.

    Below is an example of this error when using the Rest API:

    <?xml version="1.0" encoding="utf-8" ?>
    <Exception xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Error xsi:type="SecurityException">
        <Message>Security Error.</Message>
      </Error>
    </Exception>

    UniqueTransactionIdException

    The UniqueTransactionIdException is returned if the merchant attempts to create a new transaction with a Transaction ID that has already been registered in Netaxept for the merchant in question. The combination of Merchant ID and Transaction ID needs to be unique for every Register call.

    Below is an example of this error when using the Rest API:

    <Exception xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Error xsi:type="UniqueTransactionIdException">
        <Message>Transaction ID not unique</Message>
      </Error>
    </Exception>

    ValidationException

    If any input field sent to Netaxept fails validation, the ValidationException will be returned.

    Below is an example of this error when using the Rest API:

    <?xml version="1.0" encoding="utf-8" ?>
    <Exception xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Error xsi:type="ValidationException">
        <Message>Field not valid: 'Customer Phone Number'</Message>
      </Error>
    </Exception>

    QueryException

    If for some reason the Query service is unable to complete your request, you will receive the QueryException.

    Below is an example of this error when using the Rest API:

    <Exception xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Error xsi:type="QueryException">
        <Message>Unable to find transaction</Message>
      </Error>
    </Exception>

    Was this helpful?

    What was your feeling about it?