<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Generate-Ac on Corebaseit — POS · EMV · Payments · AI · Telecommunications</title><link>https://corebaseit.com/tags/generate-ac/</link><description>Recent content in Generate-Ac on Corebaseit — POS · EMV · Payments · AI · Telecommunications</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><managingEditor>contact@corebaseit.com (Vincent Bevia)</managingEditor><webMaster>contact@corebaseit.com (Vincent Bevia)</webMaster><lastBuildDate>Tue, 28 Jul 2026 15:00:00 +0200</lastBuildDate><atom:link href="https://corebaseit.com/tags/generate-ac/index.xml" rel="self" type="application/rss+xml"/><item><title>Why an EMV Contact Transaction Was Declined: AAC, TVR and Action Analysis</title><link>https://corebaseit.com/corebaseit_posts/emv-contact-transaction-declined-aac-troubleshooting/</link><pubDate>Tue, 28 Jul 2026 15:00:00 +0200</pubDate><author>contact@corebaseit.com (Vincent Bevia)</author><guid>https://corebaseit.com/corebaseit_posts/emv-contact-transaction-declined-aac-troubleshooting/</guid><description>&lt;img src="https://corebaseit.com/diagrams/Decoding_the_EMV_Decline.png" alt="Featured image of post Why an EMV Contact Transaction Was Declined: AAC, TVR and Action Analysis" />&lt;p>An EMV contact decline is not a single error. It is the outcome of decisions made by the terminal, the card, or the issuer at different stages of the transaction. Treating “declined” as one failure class usually sends debugging into the wrong subsystem.&lt;/p>
&lt;p>This post is a contact-chip troubleshooting path. It starts from the two values that fix most misdiagnoses, then walks Terminal Action Analysis, second-&lt;code>GENERATE AC&lt;/code> completion, Offline Data Authentication (ODA) side effects, and a common Application Usage Control trap. The same decision model is covered in depth in &lt;a class="link" href="https://corebaseit.com/my-books/" target="_blank" rel="noopener"
>&lt;em>POINT OF SALE ARCHITECTURE: A Practical Guide to Secure, Certifiable POS Systems&lt;/em>&lt;/a> (&lt;em>the book&lt;/em>), Chapter 3: EMV Principles, which frames EMV risk as a dual-layer control between terminal and card.&lt;/p>
&lt;h2 id="start-with-the-cryptogram">Start with the cryptogram
&lt;/h2>&lt;p>The fastest diagnostic opening is:&lt;/p>
&lt;ol>
&lt;li>What cryptogram did the terminal request?&lt;/li>
&lt;li>What cryptogram did the card return?&lt;/li>
&lt;/ol>
&lt;p>During the first or second &lt;code>GENERATE AC&lt;/code> command, the terminal requests one of three outcomes:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Cryptogram&lt;/th>
&lt;th>Meaning&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>ARQC&lt;/td>
&lt;td>Go online for issuer authorization&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>TC&lt;/td>
&lt;td>Approve offline&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>AAC&lt;/td>
&lt;td>Decline offline&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The returned type is carried in Cryptogram Information Data (CID, tag &lt;code>9F27&lt;/code>). The card may return a more restrictive result than the terminal requested. The terminal can request an ARQC while the card returns an AAC. That distinction decides where you look next:&lt;/p>
&lt;ul>
&lt;li>If the terminal requested AAC, investigate why Terminal Action Analysis selected a decline.&lt;/li>
&lt;li>If the terminal requested ARQC or TC but the card returned AAC, Card Action Analysis (or issuer-influenced completion) made the decline decision. Terminal logs may narrow the cause, but they often do not expose the card’s internal risk-management reason.&lt;/li>
&lt;/ul>
&lt;p>For the broader online versus offline decision path, see &lt;a class="link" href="https://corebaseit.com/corebaseit_posts/online-vs-offline-emv-transactions/" >Online vs Offline EMV Transactions&lt;/a>. For how ARQC binds transaction data, see &lt;a class="link" href="https://corebaseit.com/corebaseit_posts/emv-cryptograms-arqc/" >EMV Cryptograms: How ARQC Prevents Fraud&lt;/a>.&lt;/p>
&lt;p>Open the image below for the full diagnostic path (or click to view full size).&lt;/p>
&lt;p style="text-align: center;">
&lt;a href="https://corebaseit.com/diagrams/EMV-Transaction-decline.png" target="_blank" rel="noopener">
&lt;img src="https://corebaseit.com/diagrams/EMV-Transaction-decline.png" alt="EMV contact decline diagnostic path: cryptogram requested vs returned, first and second GENERATE AC, TVR and TAC/IAC comparison, ODA and CAPK failures, and requested service not allowed" style="max-width: 720px; width: 100%; height: auto;" />
&lt;/a>
&lt;/p>
&lt;h2 id="if-the-terminal-requested-aac-at-the-first-generate-ac">If the terminal requested AAC at the first GENERATE AC
&lt;/h2>&lt;p>For an online-capable terminal, compare the Terminal Verification Results (TVR, tag &lt;code>95&lt;/code>) with:&lt;/p>
&lt;ul>
&lt;li>Terminal Action Code — Denial (TAC-Denial)&lt;/li>
&lt;li>Issuer Action Code — Denial (IAC-Denial)&lt;/li>
&lt;/ul>
&lt;p>A bit set in both the TVR and the applicable Denial action code identifies a condition that can drive the terminal to request AAC. EMV Book 3 Terminal Action Analysis evaluates Denial before Online; Default applies when the terminal cannot complete the online path.&lt;/p>
&lt;p>For an offline-only terminal, perform the same Denial comparison first. If no Denial condition matches, compare the TVR with Terminal and Issuer Action Codes — Default. Default action codes apply when a transaction cannot be completed online.&lt;/p>
&lt;p>The useful debugging operation is a bitwise comparison, not a visual comparison of whole hexadecimal strings:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span>denial_match = TVR AND (TAC-Denial OR IAC-Denial)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>default_match = TVR AND (TAC-Default OR IAC-Default)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Decode every matching bit against EMV Book 3 Annex C (TVR bit definitions) and the TAC values actually loaded for the selected AID. IAC values come from the card application for that AID. Do not reuse TAC packs from another kernel, region, or scheme profile without checking what was certified for this terminal configuration.&lt;/p>
&lt;h2 id="if-the-terminal-requested-aac-at-the-second-generate-ac">If the terminal requested AAC at the second GENERATE AC
&lt;/h2>&lt;p>Check the online path first:&lt;/p>
&lt;ul>
&lt;li>Issuer declined: confirm the authorization response and the host decision.&lt;/li>
&lt;li>Unable to go online: compare the TVR with TAC-Default and IAC-Default.&lt;/li>
&lt;/ul>
&lt;p>Before the second &lt;code>GENERATE AC&lt;/code>, verify that the payment application supplied the correct issuer data to the kernel. Elements that matter for completion include:&lt;/p>
&lt;ul>
&lt;li>Authorization Response Code, tag &lt;code>8A&lt;/code>&lt;/li>
&lt;li>Authorization Code, tag &lt;code>89&lt;/code>, when present&lt;/li>
&lt;li>Issuer Authentication Data, tag &lt;code>91&lt;/code>, when present&lt;/li>
&lt;li>Issuer Script Templates, tags &lt;code>71&lt;/code> and &lt;code>72&lt;/code>, when present&lt;/li>
&lt;/ul>
&lt;p>Malformed issuer authentication data, an incorrect response code, or invalid issuer scripts can cause the card to return AAC during completion. In the dual-layer model from Chapter 3, the second &lt;code>GENERATE AC&lt;/code> embeds the issuer-influenced outcome into EMV state: TC for final approval, AAC for final decline.&lt;/p>
&lt;p>This completion path is also where teams confuse true offline EMV approval with deferred host authorization. Those are different mechanisms; see &lt;a class="link" href="https://corebaseit.com/corebaseit_posts/offline-emv-vs-store-and-forward/" >Offline EMV vs Store-and-Forward&lt;/a>.&lt;/p>
&lt;h2 id="do-not-misdiagnose-an-oda-failure">Do not misdiagnose an ODA failure
&lt;/h2>&lt;p>A missing Certification Authority Public Key (CAPK) does not automatically mean that the kernel must decline. It causes Offline Data Authentication (ODA) to fail and sets the corresponding TVR condition. Terminal Action Analysis then determines the requested cryptogram by comparing the TVR with the applicable TAC and IAC values.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span>Missing CAPK → ODA failure → TVR bit set → action analysis → AAC, ARQC or TC
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The configured action codes decide whether that failure becomes an offline decline, an online request, or another permitted outcome. Chapter 3 makes the same architectural point: CAPKs are trust anchors in the terminal; missing or stale keys break certificate recovery, but the decline decision still flows through action analysis rather than a hard-coded “no CAPK ⇒ AAC” rule.&lt;/p>
&lt;h2 id="watch-for-requested-service-not-allowed">Watch for “requested service not allowed”
&lt;/h2>&lt;p>TVR byte 2, bit 5 indicates that the requested service is not allowed for the card product. One input to that processing-restrictions check is Application Usage Control (AUC, tag &lt;code>9F07&lt;/code>).&lt;/p>
&lt;p>A recurring integration failure mode is to populate cashback amount fields—tags &lt;code>9F03&lt;/code> or &lt;code>9F04&lt;/code>—for a transaction that has no cashback. In several kernels I have worked with, the presence of either element is treated as a cashback request even when its value is zero. If the AUC does not permit cashback, the kernel may set “requested service not allowed,” Terminal Action Analysis may request AAC, and the field looks like a mysterious decline rather than a data-object mistake.&lt;/p>
&lt;p>Interpretation note: EMV Book 3 defines the TVR bit and AUC-driven service checks; whether a zero-value &lt;code>9F03&lt;/code>/&lt;code>9F04&lt;/code> counts as “cashback present” is kernel- and configuration-dependent. Confirm against your scheme and kernel specification. If the transaction is not cashback, omit the cashback amount elements unless those specs explicitly require them.&lt;/p>
&lt;h2 id="a-compact-decline-checklist">A compact decline checklist
&lt;/h2>&lt;ol>
&lt;li>Capture both &lt;code>GENERATE AC&lt;/code> command-response pairs.&lt;/li>
&lt;li>Record the cryptogram requested by the terminal and returned by the card (CID, tag &lt;code>9F27&lt;/code>).&lt;/li>
&lt;li>Decode the TVR bit by bit.&lt;/li>
&lt;li>Export the TAC and IAC values used for the selected AID.&lt;/li>
&lt;li>Reproduce Terminal Action Analysis with bitwise comparisons.&lt;/li>
&lt;li>For a second-&lt;code>GENERATE AC&lt;/code> decline, validate tags &lt;code>8A&lt;/code>, &lt;code>89&lt;/code>, &lt;code>91&lt;/code>, &lt;code>71&lt;/code>, and &lt;code>72&lt;/code>.&lt;/li>
&lt;li>Confirm the transaction type and avoid unintended cashback fields.&lt;/li>
&lt;li>If the card returned AAC against an ARQC or TC request, involve the issuer or scheme when the available card data does not expose the reason.&lt;/li>
&lt;/ol>
&lt;h2 id="references">References
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://corebaseit.com/my-books/" target="_blank" rel="noopener"
>&lt;em>POINT OF SALE ARCHITECTURE: A Practical Guide to Secure, Certifiable POS Systems&lt;/em>&lt;/a> — Chapter 3: EMV Principles (dual-layer risk management, TVR, TAC/IAC, &lt;code>GENERATE AC&lt;/code> outcomes, CAPKs, and Offline Data Authentication).&lt;/li>
&lt;li>&lt;a class="link" href="https://www.emvco.com/emv-technologies/contact-chip/" target="_blank" rel="noopener"
>EMVCo — EMV Contact Chip&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://www.emvco.com/specifications/" target="_blank" rel="noopener"
>EMVCo — Specifications and Associated Bulletins&lt;/a>&lt;/li>
&lt;li>&lt;strong>EMV Integrated Circuit Card Specifications for Payment Systems, Book 3: Application Specification&lt;/strong> — Terminal Action Analysis, Terminal Verification Results, Card Action Analysis, and &lt;code>GENERATE AC&lt;/code>.&lt;/li>
&lt;li>&lt;strong>EMV Integrated Circuit Card Specifications for Payment Systems, Book 4: Cardholder, Attendant, and Acquirer Interface Requirements&lt;/strong> — terminal transaction processing and online completion.&lt;/li>
&lt;li>&lt;a class="link" href="https://www.openscdp.org/scripts/tutorial/emv/terminalactionanalysis.html" target="_blank" rel="noopener"
>CardContact OpenSCDP — Terminal Action Analysis&lt;/a> — worked examples of TVR / IAC / TAC matching and &lt;code>GENERATE AC&lt;/code> P1 coding.&lt;/li>
&lt;/ul></description></item></channel></rss>