Error handling

After submitting a call, you receive a confirmation that the message was received, and if it was correctly processed. The API returns HTTP status codes and the response message. For a list of request and response fields, see Response handling.

Test card response handling

Test card generation fails, with a 4XX or 5XX HTTP response, in the following cases:

  • The range start test card number is larger than the end one.
  • The range start and the end test card numbers have different lengths, i.e. they do not have the same amount of digits.
  • The test card numbers are shorter than 6 digits or longer than 19 digits.
  • The test card numbers do not observe BIN code and AVS constraints (see Requirements).
  • If you use a generated test card number to carry out an actual payment, the test card number needs to be Luhn compliant because this check is part of standard behavior in a live environment.

A Luhn compliance error is returned as a 101 Invalid card number fault code.
When this happens, you receive a fault response with a description of the problem. In general, your toolkit handles this situation as an exception. Payment requests that are rejected with an error message are not charged.