<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Get Transaction Response-MLE Encoding issue in cybersource APIs</title>
    <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Get-Transaction-Response-MLE-Encoding-issue/m-p/96252#M4603</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Following behavior has been observed with "Get Transaction by ID" REST API:&lt;/P&gt;&lt;P&gt;https://{CYBERSOURCE.ENVIRONMENT}/tss/v2/transactions/{id}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Issue&lt;/STRONG&gt;:&lt;BR /&gt;When requesting Response-MLE (via &lt;STRONG&gt;&lt;EM&gt;v-c-response-mle-kid&lt;/EM&gt;&lt;/STRONG&gt; in the JWT authorization token) with &lt;EM&gt;Accept-Encoding: gzip&lt;/EM&gt;, the Get Transaction API returns a &lt;EM&gt;Content-Encoding: gzip&lt;/EM&gt; response header, but the payload is an uncompressed JSON string rather than GZip-compressed data.&lt;BR /&gt;When Response-MLE is not requested with &lt;EM&gt;Accept-Encoding: gzip&lt;/EM&gt;, the response body is properly GZip-encoded as expected.&lt;/P&gt;&lt;P&gt;Errors observed:&lt;/P&gt;&lt;P&gt;1) &lt;STRONG&gt;Postman&lt;/STRONG&gt; - incorrect header check&lt;/P&gt;&lt;P&gt;2) &lt;STRONG&gt;SFCC javascript&lt;/STRONG&gt; - java.util.zip.ZipException: Not in GZIP format&lt;/P&gt;&lt;P&gt;3) &lt;STRONG&gt;Git Bash cUrl&lt;/STRONG&gt;: (23) client returned ERROR on write of 1361 bytes&lt;/P&gt;&lt;P&gt;4) &lt;STRONG&gt;Javascript Fetch&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;TypeError: terminated&lt;BR /&gt;at Fetch.onAborted (node:internal/deps/undici/undici:13933:53)&lt;BR /&gt;at Fetch.emit (node:events:514:28)&lt;BR /&gt;at Fetch.terminate (node:internal/deps/undici/undici:13063:14)&lt;BR /&gt;at Object.onError (node:internal/deps/undici/undici:14067:38)&lt;BR /&gt;at Gunzip.emit (node:events:526:24)&lt;BR /&gt;at emitErrorNT (node:internal/streams/destroy:170:8)&lt;BR /&gt;at emitErrorCloseNT (node:internal/streams/destroy:129:3)&lt;BR /&gt;at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {&lt;BR /&gt;[cause]: Error: incorrect header check&lt;BR /&gt;at genericNodeError (node:internal/errors:986:15)&lt;BR /&gt;at wrappedFn (node:internal/errors:540:14)&lt;BR /&gt;at Zlib.zlibOnError [as onerror] (node:zlib:197:13) {&lt;BR /&gt;errno: -3,&lt;BR /&gt;code: 'Z_DATA_ERROR'&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;5)&lt;STRONG&gt; PowerShell Script with RestMethod&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Invoke-RestMethod : The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;6) &lt;STRONG&gt;PowerShell Script with System.Net.Http.HttpClient&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A non-encrypted response is returned as GZip, which the client processes as expected.&lt;/LI&gt;&lt;LI&gt;When an encrypted response is requested with "Accept-Encoding: gzip", the response contains "Content-Encoding: gzip"; however, the actual body is a JSON string.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The fix&lt;/STRONG&gt; that resolves this issue on client side is to update request headers, so instead of&lt;BR /&gt;&lt;STRIKE&gt;"Accept-Encoding: gzip"&lt;/STRIKE&gt;&lt;BR /&gt;to ensure the client sends:&lt;BR /&gt;"&lt;STRONG&gt;Accept-Encoding: identity&lt;/STRONG&gt;"&lt;BR /&gt;that tells the server:&lt;BR /&gt;"&lt;EM&gt;Send the response in its original, uncompressed form. Do not apply content encoding such as gzip, br (Brotli), or deflate.&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;BR /&gt;&lt;BR /&gt;PS: not sure if other APIs are impacted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 21 Nov 2026 19:44:56 GMT</pubDate>
    <dc:creator>velizarn</dc:creator>
    <dc:date>2026-11-21T19:44:56Z</dc:date>
    <item>
      <title>Get Transaction Response-MLE Encoding issue</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Get-Transaction-Response-MLE-Encoding-issue/m-p/96252#M4603</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Following behavior has been observed with "Get Transaction by ID" REST API:&lt;/P&gt;&lt;P&gt;https://{CYBERSOURCE.ENVIRONMENT}/tss/v2/transactions/{id}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Issue&lt;/STRONG&gt;:&lt;BR /&gt;When requesting Response-MLE (via &lt;STRONG&gt;&lt;EM&gt;v-c-response-mle-kid&lt;/EM&gt;&lt;/STRONG&gt; in the JWT authorization token) with &lt;EM&gt;Accept-Encoding: gzip&lt;/EM&gt;, the Get Transaction API returns a &lt;EM&gt;Content-Encoding: gzip&lt;/EM&gt; response header, but the payload is an uncompressed JSON string rather than GZip-compressed data.&lt;BR /&gt;When Response-MLE is not requested with &lt;EM&gt;Accept-Encoding: gzip&lt;/EM&gt;, the response body is properly GZip-encoded as expected.&lt;/P&gt;&lt;P&gt;Errors observed:&lt;/P&gt;&lt;P&gt;1) &lt;STRONG&gt;Postman&lt;/STRONG&gt; - incorrect header check&lt;/P&gt;&lt;P&gt;2) &lt;STRONG&gt;SFCC javascript&lt;/STRONG&gt; - java.util.zip.ZipException: Not in GZIP format&lt;/P&gt;&lt;P&gt;3) &lt;STRONG&gt;Git Bash cUrl&lt;/STRONG&gt;: (23) client returned ERROR on write of 1361 bytes&lt;/P&gt;&lt;P&gt;4) &lt;STRONG&gt;Javascript Fetch&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;TypeError: terminated&lt;BR /&gt;at Fetch.onAborted (node:internal/deps/undici/undici:13933:53)&lt;BR /&gt;at Fetch.emit (node:events:514:28)&lt;BR /&gt;at Fetch.terminate (node:internal/deps/undici/undici:13063:14)&lt;BR /&gt;at Object.onError (node:internal/deps/undici/undici:14067:38)&lt;BR /&gt;at Gunzip.emit (node:events:526:24)&lt;BR /&gt;at emitErrorNT (node:internal/streams/destroy:170:8)&lt;BR /&gt;at emitErrorCloseNT (node:internal/streams/destroy:129:3)&lt;BR /&gt;at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {&lt;BR /&gt;[cause]: Error: incorrect header check&lt;BR /&gt;at genericNodeError (node:internal/errors:986:15)&lt;BR /&gt;at wrappedFn (node:internal/errors:540:14)&lt;BR /&gt;at Zlib.zlibOnError [as onerror] (node:zlib:197:13) {&lt;BR /&gt;errno: -3,&lt;BR /&gt;code: 'Z_DATA_ERROR'&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;5)&lt;STRONG&gt; PowerShell Script with RestMethod&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Invoke-RestMethod : The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;6) &lt;STRONG&gt;PowerShell Script with System.Net.Http.HttpClient&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A non-encrypted response is returned as GZip, which the client processes as expected.&lt;/LI&gt;&lt;LI&gt;When an encrypted response is requested with "Accept-Encoding: gzip", the response contains "Content-Encoding: gzip"; however, the actual body is a JSON string.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The fix&lt;/STRONG&gt; that resolves this issue on client side is to update request headers, so instead of&lt;BR /&gt;&lt;STRIKE&gt;"Accept-Encoding: gzip"&lt;/STRIKE&gt;&lt;BR /&gt;to ensure the client sends:&lt;BR /&gt;"&lt;STRONG&gt;Accept-Encoding: identity&lt;/STRONG&gt;"&lt;BR /&gt;that tells the server:&lt;BR /&gt;"&lt;EM&gt;Send the response in its original, uncompressed form. Do not apply content encoding such as gzip, br (Brotli), or deflate.&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;BR /&gt;&lt;BR /&gt;PS: not sure if other APIs are impacted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2026 19:44:56 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/Get-Transaction-Response-MLE-Encoding-issue/m-p/96252#M4603</guid>
      <dc:creator>velizarn</dc:creator>
      <dc:date>2026-11-21T19:44:56Z</dc:date>
    </item>
  </channel>
</rss>

