> ## 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.

# transaction.updated

<Update label="v1.2.0" description="minor update">
  ### fundMovements field added

  Added the `fundMovements` array to the `transaction.updated` (spend) webhook payload. Each entry describes one on-chain fund movement that backs the card transaction. For example, the authorization pull that reserved funds on-chain. Movements are ordered oldest first. You receive this field only if your tenant is opted in to webhook version `1.2.0` or later; earlier versions never include it. When no on-chain movements back the transaction, `fundMovements` is an empty array.

  #### New Field

  | Field                 | Type    | Description                                                                                                          |
  | --------------------- | ------- | -------------------------------------------------------------------------------------------------------------------- |
  | `spend.fundMovements` | `array` | On-chain fund movements backing the transaction, ordered oldest first. Empty when no movements back the transaction. |

  #### `fundMovements[]` Object

  | Field         | Type     | Description                                                              |
  | ------------- | -------- | ------------------------------------------------------------------------ |
  | `hash`        | `string` | The on-chain transaction hash for this movement.                         |
  | `chainId`     | `string` | The chain identifier where the movement settled (for example, `0x2105`). |
  | `kind`        | `string` | The type of fund movement. See possible values below.                    |
  | `direction`   | `string` | The direction of the movement. Currently always `debit`.                 |
  | `amountCents` | `number` | The amount moved, in cents.                                              |
  | `occurredAt`  | `string` | ISO 8601 timestamp of when the movement occurred on-chain.               |

  #### Possible Values for `kind`

  | Value              | Description                                                     |
  | ------------------ | --------------------------------------------------------------- |
  | `auth`             | Initial authorization pull.                                     |
  | `incremental_auth` | Additional pull for an incremental authorization.               |
  | `force_post`       | Pull backing a force-posted settlement.                         |
  | `over_capture`     | Pull covering a settlement that exceeded the authorized amount. |
  | `sweep`            | Pull that sweeps remaining funds for the transaction.           |

  #### Example Payload

  ```json theme={null}
  {
      "resource": "transaction",
      "action": "updated",
      "version": "1.2.0",
      "body": {
          "id": "txn_abc123",
          "type": "spend",
          "spend": {
              "amount": 5000,
              "currency": "USD",
              "localAmount": 4500,
              "localCurrency": "EUR",
              "merchantName": "AMAZON",
              "merchantCity": "Seattle",
              "merchantCountry": "US",
              "merchantCategory": "Online Shopping",
              "merchantCategoryCode": "5411",
              "cardId": "card_123",
              "cardType": "virtual",
              "userId": "user_789",
              "userFirstName": "John",
              "userLastName": "Doe",
              "userEmail": "john.doe@example.com",
              "status": "reversed",
              "authorizedAt": "2026-01-27T15:30:00.000Z",
              "exchangeRate": 1.11,
              "fundMovements": [
                  {
                      "hash": "0x9f2c1a7b3e5d4c8f6a0b2d1e3f4c5a6b7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a",
                      "chainId": "0x2105",
                      "kind": "auth",
                      "direction": "debit",
                      "amountCents": 5000,
                      "occurredAt": "2026-01-27T15:29:58.000Z"
                  }
              ]
          }
      }
  }
  ```
</Update>

<Update label="v1.1.0" description="minor update">
  ### exchangeRate field added

  Added the `exchangeRate` field to the `transaction.updated` (spend) webhook payload. You receive this field only if your tenant is opted in to webhook version `1.1.0`; on the default version `1.0.0`, it is never included.

  #### New Field

  | Field                | Type                | Description                                                                                                                                                               |
  | -------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `spend.exchangeRate` | `number` (optional) | The exchange rate used to convert the local transaction amount to the settlement amount (USD). Present for international transactions where currency conversion occurred. |

  #### Example Payload

  ```json theme={null}
  {
      "resource": "transaction",
      "action": "updated",
      "version": "1.1.0",
      "body": {
          "id": "txn_abc123",
          "type": "spend",
          "spend": {
              "amount": 5000,
              "currency": "USD",
              "localAmount": 4500,
              "localCurrency": "EUR",
              "merchantName": "AMAZON",
              "merchantCity": "Seattle",
              "merchantCountry": "US",
              "merchantCategory": "Online Shopping",
              "merchantCategoryCode": "5411",
              "cardId": "card_123",
              "cardType": "virtual",
              "userId": "user_789",
              "userFirstName": "John",
              "userLastName": "Doe",
              "userEmail": "john.doe@example.com",
              "status": "reversed",
              "authorizedAt": "2026-01-27T15:30:00.000Z",
              "exchangeRate": 1.11
          }
      }
  }
  ```
</Update>

<Update label="v1.0.0" description="initial release">
  ### transaction.updated webhook (spend)

  Added the `transaction.updated` webhook for spend transactions. This webhook is triggered when a transaction is updated, such as when an authorization is reversed, the amount changes, or the transaction is declined after initial approval.

  #### Payload Fields

  | Field                             | Type                | Description                                               |
  | --------------------------------- | ------------------- | --------------------------------------------------------- |
  | `id`                              | `string`            | The transaction ID                                        |
  | `type`                            | `string`            | Always `spend` for this webhook                           |
  | `spend.amount`                    | `number`            | Transaction amount in USD                                 |
  | `spend.currency`                  | `string`            | Currency code (e.g., `USD`)                               |
  | `spend.localAmount`               | `number` (optional) | Transaction amount in local currency                      |
  | `spend.localCurrency`             | `string` (optional) | Local currency code                                       |
  | `spend.authorizedAmount`          | `number` (optional) | The authorized amount                                     |
  | `spend.authorizationUpdateAmount` | `number` (optional) | The amount by which the authorization changed             |
  | `spend.authorizationMethod`       | `string` (optional) | Method of authorization                                   |
  | `spend.merchantName`              | `string`            | Merchant name                                             |
  | `spend.merchantCity`              | `string`            | Merchant city                                             |
  | `spend.merchantCountry`           | `string`            | Merchant country                                          |
  | `spend.merchantCategory`          | `string`            | Merchant category description                             |
  | `spend.merchantCategoryCode`      | `string`            | Merchant category code (MCC)                              |
  | `spend.merchantId`                | `string` (optional) | Merchant ID                                               |
  | `spend.cardId`                    | `string`            | The card ID used for the transaction                      |
  | `spend.cardType`                  | `string`            | The card type (`virtual` or `physical`)                   |
  | `spend.companyId`                 | `string` (optional) | Company ID (for corporate cards)                          |
  | `spend.userId`                    | `string`            | The user ID                                               |
  | `spend.userFirstName`             | `string`            | User's first name                                         |
  | `spend.userLastName`              | `string` (optional) | User's last name                                          |
  | `spend.userEmail`                 | `string`            | User's email                                              |
  | `spend.status`                    | `string`            | Transaction status (`pending`, `reversed`, or `declined`) |
  | `spend.declinedReason`            | `string` (optional) | Reason for decline (only when status is `declined`)       |
  | `spend.authorizedAt`              | `string`            | ISO 8601 timestamp of authorization                       |
  | `spend.signature`                 | `string` (optional) | Signature for verification                                |
  | `spend.timestamp`                 | `number` (optional) | Unix timestamp                                            |
  | `spend.iso8583.de41`              | `string` (optional) | Terminal ID (ISO 8583 Data Element 41)                    |

  #### Status Values

  | Status     | Description                                           |
  | ---------- | ----------------------------------------------------- |
  | `pending`  | Transaction is still pending settlement               |
  | `reversed` | Authorization was reversed (e.g., voided by merchant) |
  | `declined` | Transaction was declined after initial authorization  |

  #### Example Payload

  ```json theme={null}
  {
      "resource": "transaction",
      "action": "updated",
      "version": "1.0.0",
      "body": {
          "id": "txn_abc123",
          "type": "spend",
          "spend": {
              "amount": 5000,
              "currency": "USD",
              "merchantName": "SUSPICIOUS MERCHANT",
              "merchantCity": "Unknown",
              "merchantCountry": "XX",
              "merchantCategory": "Miscellaneous",
              "merchantCategoryCode": "9999",
              "cardId": "card_123",
              "cardType": "virtual",
              "userId": "user_789",
              "userFirstName": "John",
              "userLastName": "Doe",
              "userEmail": "john.doe@example.com",
              "status": "declined",
              "declinedReason": "suspected fraud",
              "authorizedAt": "2026-01-27T15:30:00.000Z"
          }
      }
  }
  ```
</Update>
