Skip to main content

Error Handling

Client (HTTP 4XX) errors and Server (HTTP 5XX) errors can occure in everyday use. With different transaction types different error handling scenarios should be used (described below).

1. HTTP Response Codes

HTTP 2XX

  • if action code < 100 (starting with “0”)

Transaction is successful.

HTTP 4XX

  • if transaction processing failed with a client error
  • if action code >= 100 and < 900 (not implemented yet, currently returns 2XX)

Transaction failed with client error, do not re-submit.

HTTP 5XX

  • if transaction processing failed with a server error
  • if action code >= 900

Transaction failed with server error, please re-submit (example re-submitting flow below)

2. Acquirer Action Codes

Acquirer actions codes are returned by the acquiring bank as a response to the transaction. In order to understand if the transaction sent to Sfey was successful two options can be used:

  1. transactionResultData.approved - true/false.

  2. transactionResultData.actionCode - action code returned by the acquiring bank. Action codes starting with "0" can be considered as successful.

Action Code Explanations

CodeExplanation
000Approved OK
001Approved with identification only
002Approved partially (only for a device that has a partial dispense capability; amount from response)
003Approved, OK (VIP)
100Do not honor
101Expired card
102Fraud suspected, do not honor
104Restricted card (ATM only)
105Call the NETS
106Allowable PIN tries exceeded
109Invalid Merchant
110Invalid Amount
111Invalid Card Number
112PIN required
116Not sufficient funds
117Incorrect PIN
118Unknown Card
119Transaction not permitted to cardholder
120Transaction not permitted to terminal
121Exceeds withdrawal amount limit
123Exceeds withdrawal frequency limit
125Card is not effective
126Invalid PIN block
127PIN length error
128PIN key synch error
129Negative online CAM, dCVV, iCVV, CVV,CAVV, dCVV2, TAVV or DTVV results Or Offline PIN authentication interrupted (Visa only)
160SCA required (Visa)
161Closed account [do not retry]
162Blocked (first used or tmp blocked)
163Life Cycle, read card update from MC ABU DE48.84=01
163Life Cycle, no update in MC ABU [do not retry] DE48.84=03
164Policy, read card update from MC ABU DE48.84=01
164Policy, no update in MC ABU [do not retry] DE48.84=03
165Authentication required DE48.84=01
165Suspected fraud [do not retry] DE48.84=03
166Violation of law
200Do not honor
201Expired card
202Fraud suspected
203Merchant contact NETS
204Restricted card
205Call the police
206Allowable PIN tries exceeded
208Lost card
209Stolen card
210Suspected counterfeit card
902Invalid transaction
903Re-enter transaction
904Format error
907Issuer is Signed Off
908Destination of message unknown
909System malfunction
911Card issuer timed out
913Duplicate transmission
918Missing transportation keys
920Security device error, try again
921Security device error
923Request already in progress
933Bad DateTime in reversal
934Format error in response (for use only in offline transaction log and reversal)
935Chip declined (for use only in offline transaction log)

3. Sfey Internal Error Codes

Following HTTP 4XX & 5XX error codes can be returned by Sfey TPS:

systemCodesystemCodeDescriptionExplanation
2MATCHING_AUTHORIZATION_SCHEMA_NOT_FOUNDcard schema configuration missing on our side
3ACQUIRER_REQUEST_FAILEDgeneral error when handling ISO-8583 messages or communicating with acquirer, most likely a bug on our side
4AUTHORIZATION_PROHIBITEDauthorization not allowed for the initial transaction in debt recovery
7INVALID_AUTHORIZATION_RESPONSEdata from ISO-8583 response does not match request
8SERIALIZATION_FAILEDincorrectly formatted JSON string
9DESERIALIZATION_FAILEDfailed to deserialize JSON data
10INVALID_STOCK_LOCATION_IDterminal location ID does not match location ID in request
11INVALID_COMPANY_IDorganization ID is either invalid, does not exist, or does not match a given terminal/device
12INVALID_VALIDATOR_DATAunable to parse EMV data or required tags are missing
13AUTHORIZATION_ACTION_CODE_ERRORno response or invalid response received from the acquiring/issuing bank
17CARD_NOT_FOUNDdebt recovery needs CPAN, but it is missing
19KEY_CONTAINER_EXCEPTIONfailed to encrypt or decrypt data
20KEY_NOT_FOUND_EXCEPTIONencryption key with a provided ID does not exist
21AUTHORIZATION_NOT_FOUNDoriginal transaction that caused the debt not found
22POS_NOT_FOUNDno terminal exists for a given validator
24REQUIRED_PROPERTY_NOT_FOUNDmissing configuration propery on our side
27INVALID_REPEAT_REQUESTdata or fields in repeat request do not match the initial request
35INVALID_REQUEST_PARAMETERSmissing/invalid data in request
39INVALID_PAN_TOKENPAN token in request does not match the token generated using tag data
41VALIDATOR_NOT_FOUNDvalidator with a given serial number and type either does not exist or is inactive
42VALIDATOR_TYPE_NOT_FOUNDvalidator type with a given name does not exist
47DEBT_RECOVERY_NOT_POSSIBLEdebt recovery not possible. possible reasons: no debt card found with the given CPAN token and company ID, authorization schema missing, no initial authorization causing the debt found for the card, the initial authorization having returned an acquirer technical error
48CARD_NOT_FOUND_FOR_DEBT_RECOVERYthere is no card in debt that can be recovered from debt with merchant-initiated manual debt recovery
59INVALID_VALIDATION_STATUStransaction validation status from request is not OK
60INVALID_VALIDATOR_DATA_TAGmandatory EMV tags in DFFF8401-DFFF8405 range are missing or empty
63CARD_EXPIREDthe card to be recovered from debt is expired
65AFC_TRANSACTION_EVENT_REQUEST_MISSINGAFC transaction events not configured to be saved
86ACQUIRER_TECHNICAL_ERRORtechnical error in acquirer system
301GENERAL_MISSING_DATAusually happens due to a bug in Sfey system
302GENERAL_OTHERusually happens due to a bug or incorrect configuration in Sfey system
303IN_PROGRESSa transaction with a given transactionUuid is currently being processed

4. How to Process Transactions in Case of HTTP 5XX Errors

Deferred (MTT/KFT) Errors

  1. Service provider tries to send tap to the TPS.
  2. If sending fails then the service provider tries to send tap 3 times, using 1 minute delay between attempts.
  3. If sending fails then the service provider tries to send tap 3 times, using 15 minute delay between attempts (OPTIONAL).
  4. If sending fails then the service provider tries to send tap 3 times, using 60 minute delay between attempts (OPTIONAL).
  5. If sending fails then the service provider tries to send tap 3 times, using 360 minute delay between attempts (OPTIONAL).
  6. If sending fails then the service provider considers the transactions as "permanently failed" and sends e-mail notification to the address [email protected]

Realtime (KFT/Retail) Errors

Simplest solution - in case of errors the transaction is denied and relevant error is displayed to the customer. Transaction will not be processed - it will just be saved to the logs.

Retail Check-In/Check-Out Errors

If error occurs during CHECK_IN then the rental period should not be started and relevant error should be displayed to the customer.

Recommended behaviour in case of failing CHECK_OUT:

  1. If TPS returns error response for the CHECK_OUT then an error should be displayed to the customer.
  2. Customer should be able to tap the card and initiate CHECK_OUT again for a total of 3 times.
  3. If all 3 CHECK_OUT requests fail then the travel period should be ended and indicated to the customer that CHECK_OUT transaction failed - customer support should be contacted.
  4. Service provider should be able to send manual CHECK_OUT request later on if needed.