---
updatedAt: 2026-02-16T08:50:28.000Z
agentTools:
  projectIndex: https://docs.myfatoorah.com/llms.txt
---

# Webhook V2

## **Introduction**

In Webhook v2, we have restructured the webhook event format and enriched its content for each event type. Compared to Webhook v1, it now provides more detailed information. Additionally, the webhook structure has been redesigned to follow an object-based format.

With Webhook v2, you can configure a retry count for events that your server fails to receive and specify the delay between each retry. The maximum number of retries is **5**, and the maximum delay is **180 seconds**.

Furthermore, the use of the **webhook secret key** is now mandatory. This key is included in the headers of the webhook event as the value of the `myfatoorah-signature` header, ensuring secure event verification.

To know more about the signature, please refer to [MyFatoorah Signature](https://docs.myfatoorah.com/docs/webhook-signature)

> ❗️ SSL
>
> SSL is required. Ensure that your server is configured to support HTTPS, with a valid server certificate.

![](https://files.readme.io/c3203e1bd9897d99907809c3b02efd1a1e2faebc6e87c206d59acbe30cfd7c4d-image.png)

<hr />

## **How it Works**

> 📘 Portal account
>
> Before you build Your Endpoint, you need to set up your webhook information in your portal account as described in the [Webhook Information](webhook-information) section.

To receive and process events, you need to set up your server and provide a URL where the webhook can take place. The URL will be something like that:\
<https://www.yourwebsite.com/your-endpoint-name>

MyFatoorah webhook will request your endpoint with a RESTful call. It means your endpoint will receive a JSON body with event data that will be in the following structure.

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Input Parameter
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        **Event.Code**
      </td>

      <td>
        number
      </td>

      <td>
        **1** For **PAYMENT\_STATUS\_CHANGED**\
        **2** For **REFUND\_STATUS\_CHANGED**\
        **3** For **BALANCE\_TRANSFERRED**\
        **4** For **SUPPLIER\_STATUS\_CHANGED**\
        **5** For **RECURRING\_UPDATES**\
        **6** For **DISPUTE\_STATUS\_CHANGED**\
        **7** For **SUPPLIER\_UPDATE\_REQUEST\_CHANGED**
      </td>
    </tr>

    <tr>
      <td>
        **Event.Name**
      </td>

      <td>
        string
      </td>

      <td>
        **PAYMENT\_STATUS\_CHANGED**\
        **REFUND\_STATUS\_CHANGED**\
        **BALANCE\_TRANSFERRED**\
        **SUPPLIER\_STATUS\_CHANGED**\
        **RECURRING\_UPDATES**\
        **DISPUTE\_STATUS\_CHANGED**\
        **SUPPLIER\_UPDATE\_REQUEST\_CHANGED**
      </td>
    </tr>

    <tr>
      <td>
        **Event.CountryIsoCode**
      </td>

      <td>
        string
      </td>

      <td>
        The country for the event portal with [3 alpha ISO format](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
      </td>
    </tr>

    <tr>
      <td>
        **Event.CreationDate**
      </td>

      <td>
        datetime
      </td>

      <td>
        The event date time format is  **ISO 8601** "yyyy-MM-ddTHH:mm:ssZ".\
        The time is in **UTC**Time zone.
      </td>
    </tr>

    <tr>
      <td>
        **Event.Reference**
      </td>

      <td>
        string
      </td>

      <td>
        The reference of the webhook event. Each webhook has its unique reference.
      </td>
    </tr>

    <tr>
      <td>
        **Data**
      </td>

      <td>
        object
      </td>

      <td>
        Contains the content of the webhook event.
      </td>
    </tr>
  </tbody>
</Table>

For now, we support five types of events:

1. **PAYMENT STATUS CHANGED**:\
   This will notify your system of the transaction status (success, failed). You will find the needed information about this event in the [Payment Status Data Model](https://docs.myfatoorah.com/docs/webhook-v2-payment-status-data-model) section.

> 👍 Updating Order Status in your System
>
> As a best practice, we recommend relying on both the **webhook** and **[GetPaymentStatus](https://docs.myfatoorah.com/docs/get-payment-status)** to update your system with the latest status of the transaction.

> 🚧 Two Webhook Events for the same Transaction
>
> In some rare scenarios, you may receive two webhook events for the same transaction. If the TransactionStatus one of these webhook events is **SUCCESS**, ignore the other webhook event and mark the order as paid in your system.

2. **REFUND STATUS CHANGED**:\
   This will notify your system of the refund status (refunded, canceled). You will find the needed information about this event in the [Refund Data Model](https://docs.myfatoorah.com/docs/webhook-v2-refund-data-model) section.
3. **BALANCE TRANSFERRED**:\
   This will notify your system of the new deposit whenever Myfatoorah transfers the balance to your bank account or your suppliers. You will find the needed information about this event in the [Balance Transferred Data Model](https://docs.myfatoorah.com/docs/webhook-v2-balance-transferred-data-model) section.
4. **SUPPLIER STATUS CHANGED**:\
   This will notify your system of the supplier account status (approved, rejected). You will find the needed information about this event in the [Supplier Data Model](https://docs.myfatoorah.com/docs/webhook-v2-supplier-data-model) section.
5. **RECURRING UPDATES**:\
   This will send a webhook event for every deduction attempt on a Recurring Payment. You will find the needed information about this event in the [Recurring Data Model](https://docs.myfatoorah.com/docs/webhook-v2-recurring-data-model) section.
6. **DISPUTE\_STATUS\_CHANGED**:\
   This will send a webhook for every dispute made over any of your transactions. You will find the needed information about this event in the [Dispute Data Model](https://docs.myfatoorah.com/docs/webhook-v2-dispute-data-model) section.
7. **SUPPLIER\_UPDATE\_REQUEST\_CHANGED**:\
   This will send a webhook event for the status of the request for editing an approved supplier. You will find the needed information about this event in the [Supplier Update Request Data Model](https://docs.myfatoorah.com/docs/supplier-update-request-data-model) section.