Skip to main content

Webhooks upgrade to the SHA algorithm

Last updated: 05-Apr-2024
Rate this article:
   If you are using shopping cart integration (e.g.: Shopify, WooCommerce, etc.), make sure to follow the instructions from the Shopping cart integration upgrade to the SHA algorithm documentation first.
  1. Log into your 2Checkout account.
  2. Navigate to Dashboard > Integrations > Webhooks and API.
    Webhooks and API screen
  3. Click on the IPN Settings / LCN Settings tab.
    There are several options for making the switch, depending on your needs. We will detail three ways, each suitable for different situations.

A. Add a new URL with SHA2/3 hash Recommended

  • Click on Add IPN URL.
    Add IPN URL
  • Add the IPN URL and select the hash algorithm.
  • The new IPN URL with its hashing algorithm will be displayed in the URL list. When you’re ready, remove the old endpoint with MD5 and use only the one with SHA algorithm.
    New IPN URL list
Like option A, the third option is suitable for merchants that are already using the LCN in a production environment and process orders through the platform.
  • Click on Add LCN URL.
    Add LCN URL
  • Add the LCN URL and select the hash algorithm.
  • The new LCN URL with its hashing algorithm will be displayed in the URL list. When you’re ready, remove the old endpoint with MD5 and use only the one with SHA algorithm.
    New LCN URL list

B. Add the SHA2/SHA3 hash and keep the MD5 hash

   Prerequisite:
This approach means that you will receive an IPN with multiple hash parameters. Therefore, you will first need to adjust your integration to be able to correctly process the extra hash parameter and respond with the new algorithm. Check this article for some IPN code samples.
  • Click on the Edit button to edit an existing URL corresponding to your default IPN listener.
    Edit IPN URL
  • Select the additional hash algorithm. Click on Save.
    Select IPN hash algorithm
  • The changes in the hashing algorithm will be displayed in the URL list.
    IPN URL list
  • After you successfully manage to validate the notification using the SHA2/SHA3 hash algorithm, remove the MD5 hash from your endpoint.
This approach might be suitable for merchants that have been selling through the platform and have been using LCNs. This will allow a smooth transition from one hashing algorithm to another, as both will be sent in the LCN until May 15th, 2024.
   Prerequisite:
This approach means that you will receive an LCN with multiple hash parameters. Therefore, you will first need to adjust your integration to be able to correctly process the extra hash parameter and respond with the new algorithm. Check this article for some LCN code samples. 
  • Click on the Edit button to edit an existing URL corresponding to your default LCN listener.
    Edit LCN URL
  • Select the additional hash algorithm. Click on Save.
    Select LCN hash algorithm
  • The changes in the hashing algorithm will be displayed in the URL list.
    LCN URL list
  • After you successfully manage to validate the notification using the SHA2/SHA3 hash algorithm, remove the MD5 hash from your endpoint.

C. Add the SHA2/SHA3 hash and deselect the MD5 hash

   This approach is best if you are using a sandbox environment, or you can afford some service interruption. This is because we will no longer send MD5 hash to this IPN endpoint, and you will need to adapt your integration to support the SHA2/SHA3 algorithm. Check this link for more details.
  • Click on the Edit button to edit an existing URL corresponding to your default IPN listener.
    Edit IPN URL 2nd option
  • Select the additional hash algorithm and deselect the MD5 hash. Click on Save.
    Select IPN hash algorithm 2nd option
  • The changes in the hashing algorithm will be displayed in the URL list.
    IPN URL list 2nd option
   This approach is best if you are using a sandbox environment, or you can afford some service interruption. This is because we will no longer send MD5 hash to this LCN endpoint, and you will need to adapt your integration to support the SHA2/SHA3 algorithm. Check this link for more details.
  • Click on the Edit button to edit an existing URL corresponding to your default LCN listener.
    Edit LCN URL 2nd option
  • Select the additional hash algorithm and deselect the MD5 hash. Click on Save.
    Select LCN hash algorithm 2nd option
  • The changes in the hashing algorithm will be displayed in the URL list.
    LCN URL list 2nd option

Troubleshooting

Even after upgrading your IPN/LCN webhooks from MD5 to the SHA2/SHA3 algorithm you can make sure your daily operations are not impacted, by following these steps:

  1. Log into your 2Checkout account.

  2. Navigate to Dashboard > Reports center > API & Webhooks.

    API & Webhooks

  3. Select Webhooks as Event source, IPN (Instant Payment Notification) or LNC (License Change Notification) as Webhooks and Fail as Status. You can also filter your search by IPN Order reference. Press on Search.

    report settings

  4. The failed IPN(s)/LCN(s) will be displayed. Select the Action icon to see more information.

    Action

  5. The retry mechanism is only for the failed IPN/LCN. You can see which one failed via the report and request / response details of each webhook.

    info box

    Additionally, on the order level, you can click on Resend IPN and, on the subscription level, you can click on Resend LCN feature in debug mode, to be able to see how your setup behaves:

    Resend IPN

    • Click on the order number, from the Order reference list.
      order reference list
    • Select Resend notification(s).
      Resend notification(s) IPN
    • Mark the Debug IPN? checkbox and click on Re-send.
      Debug IPN
    • On the debugger you can see why the IPN failed and what hash signature was used.
      IPN debugger

    Resend LCN

    • Click on the license number, from the License reference list.
      License reference list
    • Select Resend notification(s).
      Resend notification(s) LCN
    • Mark the Debug LCN? checkbox and click on Re-send.
      Debug LCN?
    • On the debugger you can see why the LCN failed and what hash signature was used.
      LCN debugger
Rate this article:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo