# Dispute notifications via webhooks

PrimeiroPay sends dispute information via webhooks to inform the merchant about the current status of the dispute.

The merchant shall inform a listener HTTPS URL to its account manager in order to set up this feature.

When your service receives a webhook notification, it must return a **200** HTTP status code. Otherwise, the webhook service considers the notification delivery as failed. PrimeiroPay currently does not retry failed webhooks.

**Example:**&#x20;

```
{
  "uniqueId":"777777777777777",
  "merchantId":"8acda4cb6193d56a0161949d31de0dda",
  "merchantTransactionId":"1331837",
  "amount":1762.0,
  "caseNumber":"26379847",
  "chargebackCountRequest":1,
  "disputeEndDateTime":"2019-10-09 21:00:00.000",
  "notificationDateTime":"2019-10-02 11:00:00.000",
  "status":"WIN",
  "acquirerReasonCodeId":77,
  "adyenMerchantRefId":"4147",
  "reasonCode":"000.100.222",
  "disputeReason":"Transaction Not Recognized By Cardholder",
  "brand":"MASTERCARD",
  "brandReasonCode":"4837"
}
```

**Frequency**

Whenever the “status” changes a webhook is being sent to the listener URL.\
A dispute notification can have the following status:\
\&#xNAN;*OPEN*\
\&#xNAN;*WIN*\
\&#xNAN;*LOSE*\
\
**The merchant receives therefor maximum three notifications for a single transaction**. PrimeiroPay currently does not retry failed webhooks.

| **Name**               | **Description**                                                                                     | **Format**                    | **Example**                              |
| ---------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------- | ---------------------------------------- |
| UniqueId               | Unique Identifier for PrimeiroPay                                                                   | AN \[a-zA-Z0-9\_]             | 8a83948355021710015507ccee0869a1         |
| merchantId             | Unique Identifier of the merchant for PrimeiroPay                                                   | AN \[a-zA-Z0-9\_]             | 8a83948355021710015507ccee0869a1         |
| merchantTransactionId  | Unique id of the transaction related to the dispute, if connected via Adyen it is the PSP Reference | AN \[a-zA-Z0-9\_]             | 8a83948355021710015507ccee0869a1         |
| amount                 | Amount of original transaction                                                                      | N13\[0- 9]{1,10}\\.\[0 -9]{2} | 54.12                                    |
| caseNumber             | Identification of the dispute at the acquirer                                                       | AN \[a-zA-Z0-9\_]             | 2791QAT326851                            |
| chargebackCountRequest | Indicates how many chargebacks were issued for the same transaction                                 | N2\[0- 9]{1,10}               | 1                                        |
| disputeEndDateTime     | Date and time of until the dispute will be open and accepting defense materials.                    | YYYY-MM-DD HH:MM:SS.sss       | 2019-10-09 21:00:00.000                  |
| notificationDateTime   | Date and time of when the notification was received by PrimeiroPay                                  | YYYY-MM-DD HH:MM:SS.sss       | 2019-10-09 21:00:00.000                  |
| Status                 | Open for new transactions, Win or Lose for when you win or lose a dispute.                          | AN \[a-zA-Z0-9\_]             | Win                                      |
| acquirerReasonCodeId   | Description of the reason code                                                                      | N3\[0- 9]{1,10}               | 77                                       |
| adyenMerchantRefId     | Merchant Reference ID from Adyen if Merchant is connected through Adyen to PrimeiroPay              | AN \[a-zA-Z0-9\_]             | 4147                                     |
| reasonCode             | Result codes as listed: <https://developers.primeiropay.com/result-codes>                           | AN \[NNN.NNN.NNN]             | 000.100.222                              |
| disputeReason          | Description/reason of the dispute, according to it’s reason code.                                   | AN \[a-zA-Z0-9\_]             | Transaction Not Recognized By Cardholder |
| brand                  | Card Brand of the dispute                                                                           | AN \[a-zA-Z0-9\_]             | MASTERCARD                               |
| brandReasonCode        | Reason code using Brand’s specification code.                                                       | AN \[a-zA-Z0-9\_]             | 4837                                     |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.primeiropay.com/disputes/dispute-notifications-via-webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
