Guides

Dispute Data Model

Data Model

Overview

The "Dispute Status Changed" webhook is triggered whenever there is a dispute triggered for a payment on your account. This webhook ensures that your system is notified of the disputes taking place and their updates, allowing for real-time updates and appropriate actions.

Your webhook endpoint will receive a POST request containing an event with a Code of 6 and Name of DISPUTE_STATUS_CHANGED. This event is particularly useful for tracking the type of chargeback and its status.


Request Model

The webhook payload consists of multiple nested objects containing essential recurring payment details.

Event Object

Input ParameterTypeDescription
Event.Codenumber6 - DISPUTE_STATUS_CHANGED
Event.NamestringDISPUTE_STATUS_CHANGED
Event.CountryIsoCodestringThe country of your account with MyFatoorah.
Event.CreationDatedatetimeThe timestamp when the event was created in ISO 8601 format.
Event.ReferencestringUnique reference ID for the webhook event.

Data Object

The Data Object contains multiple nested objects as below.

Dispute Object

Input ParameterTypeDescription
Dispute.TypestringThe type of dispute raised (e.g., CHARGEBACK - DOCUMENTREQUEST - FRAUDALERT - UNVERIFY).
Dispute.StatusstringThe current status of the dispute (e.g., PENDING - RESOLVED - LOST).
Dispute.CreatedDatedatetimeThe date and time when the dispute was created, formatted in ISO 8601 UTC.
Dispute.ChargeBackTypestringThe chargeback classification (e.g., General - Trading - Airways). Has value only if type is CHARGEBACK
Dispute.ReasonstringThe reason provided for the dispute. Has value only if type is CHARGEBACK
Dispute.DisputeTransactionIdintegerUnique identifier for the dispute transaction.
Dispute.InvoiceTransactionIdintegerIdentifier of the invoice transaction associated with the dispute.

Invoice Object

Input ParameterTypeDescription
Invoice.IdstringUnique identifier for the invoice.
Invoice.StatusstringThe current status of the invoice (e.g., PAID).
Invoice.ReferencestringA unique reference number assigned to the invoice.
Invoice.CreationDatedatetimeThe date and time when the invoice was created, formatted in ISO 8601 UTC.
Invoice.ExternalIdentifierstringThe value sent in the CustomerIdentifier field in the request.

Transaction Object

Input ParameterTypeDescription
Transaction.IdstringUnique identifier for the transaction.
Transaction.StatusstringThe status of the transaction (e.g., SUCCESS).
Transaction.PaymentMethodstringThe payment method used (e.g., VISA/MASTER).
Transaction.PaymentIdstringThe unique payment ID associated with the transaction.
Transaction.ReferenceIdstringA unique identifier assigned to the transaction for tracking purposes.
Transaction.TrackIdstringThe tracking ID for the payment transaction.
Transaction.AuthorizationIdstringA unique ID associated with the authorization of the payment.
Transaction.TransactionDatedatetimeThe date and time when the transaction was processed.
Transaction.ECIstringThe Electronic Commerce Indicator (ECI) code, representing security level.

Card Object

Input ParameterTypeDescription
Transaction.Card.NameOnCardstringName printed on the card used for the transaction.
Transaction.Card.NumberstringThe masked credit/debit card number used for the transaction.
Transaction.Card.TokenstringTokenized representation of the card, if available.
Transaction.Card.ExpiryMonthstringExpiry month of the card.
Transaction.Card.ExpiryYearstringExpiry year of the card.
Transaction.Card.BrandstringThe brand of the payment card, such as Visa or MasterCard.
Transaction.Card.IssuerstringThe issuing bank or financial institution of the card, if available.
Transaction.Card.IssuerCountrystringThe country of the card issuer.
Transaction.Card.FundingMethodstringThe funding method of the card (e.g., credit, debit).

Customer Object

Input ParameterTypeDescription
Customer.NamestringName of the customer.
Customer.MobilestringCustomer's mobile number.
Customer.EmailstringCustomer's email address.

Amount Object

Input ParameterTypeDescription
Amount.BaseCurrencystringThe base currency of your MyFatoorah account (e.g., KWD).
Amount.ValueInBaseCurrencystringThe amount in the base currency.
Amount.ServiceChargestringThe service charge applied in base currency.
Amount.ServiceChargeVATstringThe VAT applied to the service charge.
Amount.ReceivableAmountstringThe amount the vendor receives in base currency.
Amount.DisplayCurrencystringThe currency used for display.
Amount.ValueInDisplayCurrencystringThe amount in display currency.
Amount.PayCurrencystringThe currency used for payment (e.g., USD).
Amount.ValueInPayCurrencystringThe transaction value in payment currency.

Sample Event

The below sample JSON message is sent by MyFatoorah to your endpoint.

{
  "Event": {
    "Code": 6,
    "Name": "DISPUTE_STATUS_CHANGED",
    "CountryIsoCode": "KWT",
    "CreationDate": "2025-07-08T11:48:50.4330000Z",
    "Reference": "WH-290725"
  },
  "Data": {
    "Dispute": {
      "Type": "CHARGEBACK",
      "Status": "PENDING",
      "CreatedDate": "2025-07-08T11:48:50.4005403Z",
      "ChargeBackType": "General",
      "Reason": "CreditNotProcessed",
      "DisputeTransactionId": 112,
      "InvoiceTransactionId": 2825348
    },
    "Invoice": {
      "Id": "5897264",
      "Status": "PAID",
      "Reference": "2025059298",
      "CreationDate": "2025-07-08T11:46:12.12Z",
      "ExternalIdentifier": "1hGonC7bf2vNuJWuTgCGURYzi6Yu"
    },
    "Transaction": {
      "Id": "203009",
      "Status": "SUCCESS",
      "PaymentMethod": "VISA/MASTER",
      "PaymentId": "07075897264282534874",
      "ReferenceId": "518911203009",
      "TrackId": "08-07-2025_2825348",
      "AuthorizationId": "993730",
      "TransactionDate": "2025-07-08T11:46:29.853Z",
      "ECI": "02",
      "Card": {
        "NameOnCard": "fa",
        "Number": "545454xxxxxx5454",
        "Token": "",
        "ExpiryMonth": "12",
        "ExpiryYear": "34",
        "Brand": "Mastercard",
        "Issuer": "Test Bank",
        "IssuerCountry": "KWT",
        "FundingMethod": "credit"
      }
    },
    "Customer": {
      "Name": "Rhianna",
      "Mobile": "+9715555555",
      "Email": "[email protected]"
    },
    "Amount": {
      "BaseCurrency": "KWD",
      "ValueInBaseCurrency": "0.1",
      "ServiceCharge": "0.002",
      "ServiceChargeVAT": "0",
      "ReceivableAmount": "0.098",
      "DisplayCurrency": "KWD",
      "ValueInDisplayCurrency": "0.1",
      "PayCurrency": "KWD",
      "ValueInPayCurrency": "0.1"
    }
  }
}

Webhook Signature

You will use the parameters mentioned below to generate the webhook signature for the DISPUTE_STATUS_CHANGED event.

Dispute.DisputeTransactionId=112,Dispute.Status=PENDING,Invoice.Id=5897264,Invoice.Status=PAID,Transaction.Status=SUCCESS,Transaction.PaymentId=07075897264282534874,Invoice.ExternalIdentifier=1hGonC7bf2vNuJWuTgCGURYzi6Yu

This webhook allows real-time tracking of disputes, ensuring accurate financial management and automated processing in your system.