APDU Response Codes
ProtocoleTwo-byte status words (SW1-SW2) appended to every APDU response indicating success (9000), warnings, or error conditions as defined by ISO 7816-4. It is also written Status Word, SW1 SW2, and SW. The term belongs to the Protocole section of the smart card glossary.
What Are APDU Response Codes?
apdu-response-codes/" class="glossary-term-link" data-term="APDU response codes" data-definition="Two-byte status codes in APDU responses." data-category="Protocol">APDU response codes -- also called status words -- are two-byte values (SW1-SW2) appended to every response APDU returned by a smart card. They indicate whether a command succeeded, completed with a warning, or failed with a specific error condition. Every smart card interaction, from selecting an application to verifying a PIN, ends with a status word that the host software must interpret before proceeding.
The status word system is defined by ISO 7816-4 and extended by application-specific standards such as EMV, GlobalPlatform, and ICAO 9303 for ePassports.
Status Word Structure
The two bytes SW1 and SW2 are interpreted together:
| SW1 Range | Meaning |
|---|---|
| 90 | Success (SW2 = 00) |
| 61 | Success; SW2 bytes of response data still available (use GET RESPONSE) |
| 62-63 | Warning (non-volatile memory unchanged / changed) |
| 64-66 | Execution error |
| 67 | Wrong length |
| 68 | Functions in CLA not supported |
| 69 | Command not allowed |
| 6A | Wrong parameters P1-P2 |
| 6B-6F | Various errors |
Common Status Words
Engineers encounter these status words most frequently when developing smart card applications:
- 9000 -- command executed successfully without error
- 6100 -- response data available; issue GET RESPONSE with Le = SW2
- 6283 -- selected file deactivated (invalidated)
- 6982 -- security status not satisfied (authentication required)
- 6983 -- authentication method blocked (PIN locked)
- 6984 -- reference data not usable (key corrupted)
- 6985 -- conditions of use not satisfied
- 6A82 -- file or application not found
- 6A86 -- incorrect parameters P1-P2
- 6D00 -- instruction code not supported or invalid
- 6E00 -- class (CLA) not supported
Handling in Application Code
Robust smart card middleware must check the status word after every APDU exchange. A common pattern is to treat SW1=61 as a signal to issue a GET RESPONSE command to retrieve remaining data, and to map error codes to domain-specific exceptions. For SCP03 secure channels, status words are also covered by the session MAC, so tampering with the response code is detectable.
When debugging card interactions, the ATR parser and APDU trace tools are invaluable for correlating status words with the command sequence that produced them.
Related Content
Understanding ISO 7816
Normes et protocoles…if no response expected) Response APDUs append a two-byte status word (SW1 SW2). 90 00 means success; 6A 82 means file not…
ISO 14443 Deep Dive
Normes et protocoles…uses the same AID format, and responses carry the same SW1 SW2 status words. This design means a dual-interface card can…
EMV Payment Card Architecture
Normes et protocoles…verification VERIFY (PIN), signature Verify PIN; return SW 7. Risk management Check velocity, floor limits N/A 8.…
ISO 7816 Parts Guide
Normes et protocoles…command data Le Expected length of response data SW1 SW2 Status word — 90 00 = success Use the APDU Builder to construct and…
FIDO2 and Smart Cards
Normes et protocoles…Le = 00 Response APDU: Data = CBOR-encoded response map SW1 SW2 = 90 00 (success) or 6F XX (error) The CTAP2 command byte…
PKI on Smart Cards
Normes et protocoles…ALG=11 (RSA-2048) Response: 7F 49 ... (public key in TLV) SW1 SW2: 90 00 For ECC P-256 (ALG=06): Command: 00 47 00 9A 05 AC…
EMV Contactless Kernel Deep Dive
Normes et protocoles…80 A8 00 00 02 83 00 00 Response: 80 0A ... (AIP + AFL) SW1 SW2: 90 00 Kernel 2 (Mastercard) Flow Kernel 2 implements…
Secure Channel Protocols (SCP02/SCP03)
Normes et protocoles…bytes) Card Challenge (6 bytes) Card Cryptogram (8 bytes) SW1 SW2: 90 00 # Compute host cryptogram, verify card cryptogram #…
(frontend-gold-standard §1.7): the answer text is in
the initial HTML and stays reachable with JavaScript disabled, so crawlers and
AI extractors read answer-shaped chunks without depending on Alpine. #}
Frequently Asked Questions
What does status word 9000 mean?
9000 is the success status word: the command executed without error and no further response data is pending. It is the value host software checks for before proceeding to the next command in a sequence.
What does 61XX mean in an APDU response?
SW1 of 61 signals success with response data still available on the card. The SW2 byte carries the number of bytes remaining, which the host retrieves by issuing GET RESPONSE with Le set to that value.
How are APDU status word ranges organised?
SW1 partitions the space: 90 is success; 61 is success with data pending; 62 and 63 are warnings, distinguishing non-volatile memory unchanged from changed; 64 through 66 are execution errors; 67 is wrong length; 68 marks functions in the class byte that are not supported; 69 means the command is not allowed; 6A indicates wrong P1-P2 parameters; and 6B through 6F cover the remaining error conditions.
Which standard defines APDU status words?
ISO 7816-4 defines the status word system. Application-specific standards extend it with their own values, including EMV for payment, GlobalPlatform for card management, and ICAO 9303 for ePassports.
What is the smart card glossary and who is it for?
The smart card glossary is a comprehensive reference of technical terms, acronyms, and concepts used in smart card technology. It covers protocols (APDU, T=0, T=1), security (Common Criteria, EAL, HSM), hardware (SE, EEPROM, contact pad), and applications (EMV, ePassport, eSIM). It serves developers, product managers, and engineers.
Are the glossary definitions available in other languages?
Yes. SmartCardFYI provides glossary definitions in 15 languages including English, Korean, Japanese, Chinese, Spanish, Portuguese, Hindi, Arabic, French, Russian, German, Turkish, Vietnamese, Indonesian, and Thai.
Frequently Asked Questions
What does status word 9000 mean?
9000 is the success status word: the command executed without error and no further response data is pending. It is the value host software checks for before proceeding to the next command in a sequence.
What does 61XX mean in an APDU response?
SW1 of 61 signals success with response data still available on the card. The SW2 byte carries the number of bytes remaining, which the host retrieves by issuing GET RESPONSE with Le set to that value.
How are APDU status word ranges organised?
SW1 partitions the space: 90 is success; 61 is success with data pending; 62 and 63 are warnings, distinguishing non-volatile memory unchanged from changed; 64 through 66 are execution errors; 67 is wrong length; 68 marks functions in the class byte that are not supported; 69 means the command is not allowed; 6A indicates wrong P1-P2 parameters; and 6B through 6F cover the remaining error conditions.
Which standard defines APDU status words?
ISO 7816-4 defines the status word system. Application-specific standards extend it with their own values, including EMV for payment, GlobalPlatform for card management, and ICAO 9303 for ePassports.
What is the smart card glossary and who is it for?
The smart card glossary is a comprehensive reference of technical terms, acronyms, and concepts used in smart card technology. It covers protocols (APDU, T=0, T=1), security (Common Criteria, EAL, HSM), hardware (SE, EEPROM, contact pad), and applications (EMV, ePassport, eSIM). It serves developers, product managers, and engineers.
Are the glossary definitions available in other languages?
Yes. SmartCardFYI provides glossary definitions in 15 languages including English, Korean, Japanese, Chinese, Spanish, Portuguese, Hindi, Arabic, French, Russian, German, Turkish, Vietnamese, Indonesian, and Thai.