> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# dispute.updated

<Update label="v1.3.0" description="minor update">
  ### reviewedBy field added

  | Field        | Type                | Description                                                                                |
  | ------------ | ------------------- | ------------------------------------------------------------------------------------------ |
  | `reviewedBy` | `string` (optional) | Who resolved the dispute: `rain` or `network`. Versions below 1.3.0 never emit this field. |
</Update>

<Update label="v1.2.0" description="minor update">
  ### currency fields added

  | Field                  | Type                | Description                                                   |
  | ---------------------- | ------------------- | ------------------------------------------------------------- |
  | `currency`             | `string` (optional) | The dispute currency, lowercase ISO-4217 (for example, `usd`) |
  | `transaction.currency` | `string` (optional) | The disputed transaction's currency, lowercase ISO-4217       |
</Update>

<Update label="v1.1.0" description="Add disputeAmount field">
  ### v1.1.0 Changes

  Added the `disputeAmount` field to the webhook payload.

  #### New Fields

  | Field                | Type     | Description                                                                                                                                                                                                                                                                  |
  | -------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `body.disputeAmount` | `number` | Disputed amount in cents. Must be less than or equal to the transaction amount. When creating a dispute, this field is optional. If omitted, it defaults to the full transaction amount. Use this for partial disputes when you only want to dispute a portion of the total. |

  #### Example Payload

  ```json theme={null}
  {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "resource": "dispute",
      "action": "updated",
      "version": "1.1.0",
      "body": {
          "id": "dispute_abc123",
          "transactionId": "txn_def456",
          "status": "accepted",
          "disputeType": "fraud",
          "textEvidence": "I did not authorize this transaction",
          "disputeAmount": 2500,
          "createdAt": "2026-01-27T15:30:00.000Z",
          "updatedAt": "2026-02-03T09:00:00.000Z",
          "resolvedAt": "2026-02-03T09:00:00.000Z",
          "transaction": {
              "id": "txn_def456",
              "cardholderUserId": "user_789",
              "cardholderFirstName": "John",
              "cardholderLastName": "Doe",
              "amount": 5000,
              "merchantName": "UNKNOWN MERCHANT",
              "postedAt": "2026-01-25T10:00:00.000Z"
          }
      }
  }
  ```
</Update>

<Update label="v1.0.0" description="initial release">
  ### dispute.updated webhook

  Added the `dispute.updated` webhook. Rain triggers this webhook when a dispute's status or details change, such as when a dispute moves from `pending` to `inReview`, or when it resolves.

  #### Payload Fields

  | Field                                  | Type                | Description                                                                                                           |
  | -------------------------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------- |
  | `id`                                   | `string`            | Webhook ID                                                                                                            |
  | `resource`                             | `string`            | Always `"dispute"`                                                                                                    |
  | `action`                               | `string`            | Always `"updated"`                                                                                                    |
  | `version`                              | `string`            | The webhook version                                                                                                   |
  | `body.id`                              | `string`            | The dispute ID                                                                                                        |
  | `body.transactionId`                   | `string`            | The ID of the disputed transaction                                                                                    |
  | `body.status`                          | `string`            | Dispute status (see values below)                                                                                     |
  | `body.disputeType`                     | `string` (optional) | Type of dispute (see values below)                                                                                    |
  | `body.textEvidence`                    | `string` (optional) | Text evidence provided for the dispute                                                                                |
  | `body.createdAt`                       | `string`            | ISO 8601 timestamp of dispute creation                                                                                |
  | `body.updatedAt`                       | `string` (optional) | ISO 8601 timestamp of last update                                                                                     |
  | `body.resolvedAt`                      | `string` (optional) | ISO 8601 timestamp of resolution (present when status is `accepted`, `rejected`, `canceled`, or `resolvedByMerchant`) |
  | `body.transaction`                     | `object` (optional) | Details of the disputed transaction                                                                                   |
  | `body.transaction.id`                  | `string`            | Transaction ID                                                                                                        |
  | `body.transaction.cardholderUserId`    | `string` (optional) | Cardholder's user ID                                                                                                  |
  | `body.transaction.cardholderFirstName` | `string` (optional) | Cardholder's first name                                                                                               |
  | `body.transaction.cardholderLastName`  | `string` (optional) | Cardholder's last name                                                                                                |
  | `body.transaction.amount`              | `number`            | Transaction amount in USD cents                                                                                       |
  | `body.transaction.merchantName`        | `string` (optional) | Merchant name                                                                                                         |
  | `body.transaction.postedAt`            | `string` (optional) | ISO 8601 timestamp when the transaction was posted                                                                    |

  #### Dispute Status Values

  | Status               | Description                                                      |
  | -------------------- | ---------------------------------------------------------------- |
  | `pending`            | Dispute has been submitted and is awaiting review                |
  | `inReview`           | Dispute is being reviewed                                        |
  | `accepted`           | Dispute was accepted in favor of the cardholder                  |
  | `rejected`           | Dispute was rejected                                             |
  | `canceled`           | Dispute was canceled                                             |
  | `resolvedByMerchant` | Dispute was resolved because the merchant issued a direct refund |

  #### Dispute Type Values

  | Type                 | Description                            |
  | -------------------- | -------------------------------------- |
  | `fraud`              | Unauthorized or fraudulent transaction |
  | `creditNotProcessed` | A credit/refund was not processed      |
  | `serviceNotReceived` | Service was not received               |
  | `merchandiseIssue`   | Issue with merchandise received        |
  | `other`              | Other dispute reason                   |

  #### Example Payload (Accepted)

  ```json theme={null}
  {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "resource": "dispute",
      "action": "updated",
      "version": "1.0.0",
      "body": {
          "id": "dispute_abc123",
          "transactionId": "txn_def456",
          "status": "accepted",
          "disputeType": "fraud",
          "textEvidence": "I did not authorize this transaction",
          "createdAt": "2026-01-27T15:30:00.000Z",
          "updatedAt": "2026-02-03T09:00:00.000Z",
          "resolvedAt": "2026-02-03T09:00:00.000Z",
          "transaction": {
              "id": "txn_def456",
              "cardholderUserId": "user_789",
              "cardholderFirstName": "John",
              "cardholderLastName": "Doe",
              "amount": 5000,
              "merchantName": "UNKNOWN MERCHANT",
              "postedAt": "2026-01-25T10:00:00.000Z"
          }
      }
  }
  ```

  #### Dispute Lifecycle

  1. **dispute.created** - You file a dispute (status: `pending`)
  2. **dispute.updated** - Dispute progresses through review (status: `inReview`, `accepted`, `rejected`, `canceled`, or `resolvedByMerchant`)
  3. **dispute.chargebackCreated** - Rain creates a chargeback transaction (if the dispute is accepted)
</Update>
