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 are wrapped in the outer Exception tag, with an Error tag inside. The type (xsi:type) of the Error tag indicates which exception it is.

 

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. The AuthenticationException contains the following field:

  • Message = 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="AuthenticationException">
<Message>Test: Unable to authenticate merchant (credentials not passed)</Message>
</Error>
</Exception>

 

BBSException

The BBSException contains the following fields / elements:

  • Message = Provides a textual description of what failed
  • Result = Indicates 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 >
For example:

<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. It contains the following field:

  • Message = Provides a textual description of what failed
For example:

<?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="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. The MerchantTranslationException contains the following field:

  • Message = Provides a textual description of what failed

 

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. The NotSupportedException contains the following field:

  • Message = Provides a textual description of what failed
For example:

<?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. It contains the following field:

  • Message = Provides a textual description of what failed if possible. However, due to the 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.
For example:

<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. The UniqueTransactionIdException contains the following field:

  • Message = Provides a textual description of what failed
For example:

<?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="UniqueTransactionIdException">
<Message>Transaction ID not unique</Message>
</Error>
</Exception>

 

ValidationException

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

  • Message = Provides a textual description of which field fails validation and why
For example:

<?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. It contains the following field:

  • Message = Provides a textual description of what failed
For example:

<?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="QueryException">
<Message>Unable to find transaction</Message>
</Error>
</Exception>