<?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 The verification of the webhook signature is contingent on the value of authAmount. in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/The-verification-of-the-webhook-signature-is-contingent-on-the/m-p/88640#M55856</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've come across an unusual scenario where the validity of a signature is contingent on the amount provided. In summary, if the authAmount in the returned webhook body is in the format #.## (e.g., 1.01 or 2.01), the signature verification is successful. However, if authAmount is in the format *.# or * (e.g., 1.1 or 2), the signature verification fails.&lt;/P&gt;&lt;P&gt;Here's an example of a webhook with an amount of 1.1:&lt;/P&gt;&lt;P&gt;Sandbox Environment (Live Mode)&lt;/P&gt;&lt;P&gt;My Signature Key:&lt;BR /&gt;A6214F6105625D5ED957CF02E749BB440DBD4E418533D219CAD26AECD104BFFE7F47DBBE5C81927CCA484AE7722BE82CE57FB5318EDE02122277A2FE90EE68EB&lt;/P&gt;&lt;P&gt;Webhook Notification Body:&lt;/P&gt;&lt;P&gt;json&lt;BR /&gt;Copy code&lt;BR /&gt;{"notificationId":"570f7282-687a-42b7-903b-48e487d7694d","eventType":"net.authorize.payment.authcapture.created","eventDate":"2023-12-12T12:45:09.3492643Z","webhookId":"a585ea29-a370-495a-bd83-f9be7160f260","payload":{"responseCode":1,"avsResponse":"P","authAmount":1.1,"merchantReferenceId":"2M4zHFzshYBudvgIZ11B","entityName":"transaction","id":"120011377052"}}&lt;BR /&gt;My Local Hash Result:&lt;BR /&gt;sha512=0B031880F04DD8D6C98F06A234032575B19393716F7FCE84C62D4901F257D29808DF520CEFCD0225FE4374697769B6A2ED336B463031EA861C73F3396357A605&lt;/P&gt;&lt;P&gt;x-anet-signature:&lt;BR /&gt;sha512=8E3D41B0191A9A1E668FB729F350B73C6BBB81D676070FE7CFF001CA2543ABA91BD16A4374A0F6FA4542659728C7DAF79D7EC901FEC582FC2DA3263A2D604DCF&lt;/P&gt;&lt;P&gt;As you can see, the result hash is different. However, if I manually change the body from "authAmount":1.1 to "authAmount":1.10 (although this is not what the client side should do), the hash becomes:&lt;/P&gt;&lt;P&gt;Manually Changed Hash:&lt;BR /&gt;sha512=8E3D41B0191A9A1E668FB729F350B73C6BBB81D676070FE7CFF001CA2543ABA91BD16A4374A0F6FA4542659728C7DAF79D7EC901FEC582FC2DA3263A2D604DCF&lt;/P&gt;&lt;P&gt;This hash matches the x-anet-signature header.&lt;/P&gt;&lt;P&gt;Could someone provide assistance in resolving this situation?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2024 13:52:23 GMT</pubDate>
    <dc:creator>Mathew312</dc:creator>
    <dc:date>2024-01-17T13:52:23Z</dc:date>
    <item>
      <title>The verification of the webhook signature is contingent on the value of authAmount.</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/The-verification-of-the-webhook-signature-is-contingent-on-the/m-p/88640#M55856</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've come across an unusual scenario where the validity of a signature is contingent on the amount provided. In summary, if the authAmount in the returned webhook body is in the format #.## (e.g., 1.01 or 2.01), the signature verification is successful. However, if authAmount is in the format *.# or * (e.g., 1.1 or 2), the signature verification fails.&lt;/P&gt;&lt;P&gt;Here's an example of a webhook with an amount of 1.1:&lt;/P&gt;&lt;P&gt;Sandbox Environment (Live Mode)&lt;/P&gt;&lt;P&gt;My Signature Key:&lt;BR /&gt;A6214F6105625D5ED957CF02E749BB440DBD4E418533D219CAD26AECD104BFFE7F47DBBE5C81927CCA484AE7722BE82CE57FB5318EDE02122277A2FE90EE68EB&lt;/P&gt;&lt;P&gt;Webhook Notification Body:&lt;/P&gt;&lt;P&gt;json&lt;BR /&gt;Copy code&lt;BR /&gt;{"notificationId":"570f7282-687a-42b7-903b-48e487d7694d","eventType":"net.authorize.payment.authcapture.created","eventDate":"2023-12-12T12:45:09.3492643Z","webhookId":"a585ea29-a370-495a-bd83-f9be7160f260","payload":{"responseCode":1,"avsResponse":"P","authAmount":1.1,"merchantReferenceId":"2M4zHFzshYBudvgIZ11B","entityName":"transaction","id":"120011377052"}}&lt;BR /&gt;My Local Hash Result:&lt;BR /&gt;sha512=0B031880F04DD8D6C98F06A234032575B19393716F7FCE84C62D4901F257D29808DF520CEFCD0225FE4374697769B6A2ED336B463031EA861C73F3396357A605&lt;/P&gt;&lt;P&gt;x-anet-signature:&lt;BR /&gt;sha512=8E3D41B0191A9A1E668FB729F350B73C6BBB81D676070FE7CFF001CA2543ABA91BD16A4374A0F6FA4542659728C7DAF79D7EC901FEC582FC2DA3263A2D604DCF&lt;/P&gt;&lt;P&gt;As you can see, the result hash is different. However, if I manually change the body from "authAmount":1.1 to "authAmount":1.10 (although this is not what the client side should do), the hash becomes:&lt;/P&gt;&lt;P&gt;Manually Changed Hash:&lt;BR /&gt;sha512=8E3D41B0191A9A1E668FB729F350B73C6BBB81D676070FE7CFF001CA2543ABA91BD16A4374A0F6FA4542659728C7DAF79D7EC901FEC582FC2DA3263A2D604DCF&lt;/P&gt;&lt;P&gt;This hash matches the x-anet-signature header.&lt;/P&gt;&lt;P&gt;Could someone provide assistance in resolving this situation?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 13:52:23 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/The-verification-of-the-webhook-signature-is-contingent-on-the/m-p/88640#M55856</guid>
      <dc:creator>Mathew312</dc:creator>
      <dc:date>2024-01-17T13:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: The verification of the webhook signature is contingent on the value of authAmount.</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/The-verification-of-the-webhook-signature-is-contingent-on-the/m-p/88743#M55921</link>
      <description>&lt;P&gt;&lt;SPAN&gt;It seems that the signature verification issue is related to the precision of the authAmount value. Ensure consistent formatting for the authAmount field, using two decimal places, even for whole numbers (e.g., "authAmount": 1.00 instead of "authAmount": 1). This should align the hash generation and resolve the signature verification problem.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2024 07:01:33 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/The-verification-of-the-webhook-signature-is-contingent-on-the/m-p/88743#M55921</guid>
      <dc:creator>Shawn232</dc:creator>
      <dc:date>2024-02-03T07:01:33Z</dc:date>
    </item>
  </channel>
</rss>

