# Update Dispute

When a client challenges the legitimacy of a transaction made using their registered transacting account, it is referred to as a disputed transaction.

Following the dispute raised in the panel, the client can use the edit option in the action menu to correct any necessary details. Once editing is complete, the details update button will be activated.

`PATCH` `https://stgsecctrl.tutelar.io/api/v1/dispute/update/:disputeId`

200: Success response\
422: Unprocessable Entity\
401: Unauthorized\
404: Request not found\
500: Internal Server Error

```json
{
   "success": true,
   "code": 200,
   "message": "Dispute Details updated successfully",
   "data": {}
}
```

```json
{
    "success": false,
    "code": 300,
    "message": "Update configuration  setting.",
    "data": {}
}
```

```json
{
   "success": false,
   "code": 300,
   "message": "Unauthorized access",
   "data": {}
}
```

```json
{
     "success": false,
     "code": 300,
     "message": "Request not found",
     "data": {}
}
```

```json
{
   "success": false,
   "code": 300,
   "message": "Something went wrong",
   "data": {}
}
```

### Post Parameters

#### Post parameters description is given below :

| Post Parameter          | Type   | Is mandatory | Description                                                                                                                                                                                                |
| ----------------------- | ------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| disputeType             | String | No           | Dispute type is used to identify what kind of dispute is raised by the customer , various types of disputes are as follows fraud , chargeback , BO, complaint.                                             |
| internalDueDate         | Date   | No           | Internal due date refers to the final date that a resolution need to be provided for an dispute.                                                                                                           |
| reasonCode              | String | No           | Send the reason code based on your transaction type. For instance, if you've made a transaction using a Visa card, send the sample code: 10.1                                                              |
| paymentType             | String | No           | Payment type is used to mention the payment type the customer is used to pay the required amount , payment type includes credit card , debit card ,POS.                                                    |
| acquirerBankCode        | String | No           | The payment receiver bank is also called an acquirer bank . Every individual bank have an individual code referred to as acquirer bank code.                                                               |
| disputeAmountTdrDetails | Object | No           | The TDR type,amount,amount type is using To calculate the TDR amount from dispute Amount. disputeAmountTdrDetails has fields **\[type, amountType ( Type as String )].amount** data type is **Number**.    |
| disputeAmountTaxDetails | Object | No           | The TAX type, amount, amount type is using To calculate the TAX amount from dispute Amount. disputeAmountTaxDetails has fields **\[ type, amountType ( Type as String )].amount** data type is **Number**. |

#### Sample Post Parameters

```json
{
  "transactionDetails": {
    "id": "trans_53146",
    "customerName": "Johnson",
    "customerEmail": "johnson.a@ippopay.com",
    "customerMobile": "9878987677",
    "amount": "1001",
    "transactionDate": "2023-10-11"
  },
  "merchantDetails": {
    "id": "TUT778t78yt",
    "name": "Thiyagarajan",
    "businessName": "Hamam",
    "chargebackEmail": "thiyagarajan.e@ippopay.com",
    "mobile": "9087657767"
  },
  "disputeAmount": "100",
  "disputeAmountTdrDetails": {
    "type": "include",
    "amountType": "price",
    "amount": "50"
  },
  "disputeAmountTaxDetails": {
    "type": "exclude",
    "amountType": "percentage",
    "amount": "50"
  },
  "disputeType": "dispute",
  "internalDueDate": "2023-12-31",
  "dueDate": 9,
  "level": "level_1",
  "paymentType": "cc",
  "acquirerBankCode": "HDFC",
  "remitterBank": "Indian Overseas Bank ",
  "reasonCode": "109",
  "nodalAccountNo": "0989778",
  "gatewayOrderId": "ORD_90045",
  "paymentInstrumentId": "89 09 78",
  "comments": " Transaction issues "
}
```

### Success Response

```json
{
    "success": true,
    "code": 200,
    "message": "Updated successful",
    "data": {}
}
```

#### Failure Response

```json
{
   "success": false,
   "code": 300,
   "message": "Please Update general configuration",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Invalid data received from Dispute type",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Invalid Date format in Internal Due date",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Internal due date should be greater than 2024-04-10",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Invalid reason code.",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Acquirer bank code should be 4 characters",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Please add acquirer bank details",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "dispute-tdr type field is missing",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Invalid data received from dispute-tdr type",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "dispute-tdr amount type field is missing",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Invalid data received from dispute-tdr amount type",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Dispute-tdr amount missing",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Dispute-tdr amount is should be an number",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Invalid data received from dispute-tax type",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "dispute-tdr amount tax field is missing",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Invalid data received from dispute-tax type",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Dispute-tax amount type missing",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Invalid data received from dispute-tax amount type",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Dispute-tax amount missing",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Dispute-tax amount is should be an number",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Dispute-tdr amount should not be greater than dispute amount",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Dispute-tax amount should not be greater than dispute amount",
   "data": {}
}
{
   "success": false,
   "code": 300,
   "message": "Total of tax and tdr amount should not be greater than dispute amount",
   "data": {}
}
```


---

# 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://docs.v2.tutelar.io/update-dispute.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.
