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

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

  Added the `threeDSecure` field to the `transaction.requested` (spend) webhook payload. This field indicates whether 3D Secure authentication was used for the transaction.

  #### New Field

  | Field                | Type                 | Description                                                             |
  | -------------------- | -------------------- | ----------------------------------------------------------------------- |
  | `spend.threeDSecure` | `boolean` (optional) | Indicates whether 3D Secure authentication was used for the transaction |

  #### Example Payload

  ```json theme={null}
  {
      "resource": "transaction",
      "action": "requested",
      "version": "1.1.0",
      "body": {
          "id": "txn_abc123",
          "type": "spend",
          "spend": {
              "amount": 2500,
              "currency": "USD",
              "localAmount": 2250,
              "localCurrency": "EUR",
              "authorizedAmount": 7500,
              "previouslyAuthorizedAmount": 5000,
              "merchantName": "HOTEL MARRIOTT",
              "merchantCity": "New York",
              "merchantCountry": "US",
              "merchantCategory": "Hotels and Motels",
              "merchantCategoryCode": "7011",
              "cardId": "card_123",
              "cardType": "virtual",
              "companyId": "company_456",
              "userId": "user_789",
              "userFirstName": "John",
              "userLastName": "Doe",
              "userEmail": "john.doe@example.com",
              "status": "pending",
              "authorizedAt": "2026-01-27T15:30:00.000Z",
              "exchangeRate": 1.11,
              "threeDSecure": true
          }
      }
  }
  ```
</Update>

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

  Added the `transaction.requested` webhook for spend transactions. Rain triggers this webhook when an incremental authorization request arrives for an existing transaction. It allows you to approve or decline additional authorization amounts on top of the original authorization.

  #### Payload Fields

  | Field                              | Type                | Description                                                                                                                                                                                       |
  | ---------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `id`                               | `string`            | The transaction ID                                                                                                                                                                                |
  | `type`                             | `string`            | Always `spend` for this webhook                                                                                                                                                                   |
  | `spend.amount`                     | `number`            | The amount you're asked to approve in this event, in USD. On an initial authorization, you receive the full authorization amount; on an incremental authorization, you receive only the increment |
  | `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`            | The new total you authorize on the hold if you approve this request. Always equals `previouslyAuthorizedAmount` + `amount`                                                                        |
  | `spend.authorizationMethod`        | `string` (optional) | Method of authorization                                                                                                                                                                           |
  | `spend.previouslyAuthorizedAmount` | `number`            | The total you authorized before this event (`0` on an initial authorization)                                                                                                                      |
  | `spend.tokenizedSource`            | `string` (optional) | Source of tokenization (e.g., `apple_pay`, `google_pay`)                                                                                                                                          |
  | `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`            | Always `pending` for this webhook                                                                                                                                                                 |
  | `spend.authorizedAt`               | `string`            | ISO 8601 timestamp of authorization                                                                                                                                                               |
  | `spend.signature`                  | `string` (optional) | Signature for verification                                                                                                                                                                        |
  | `spend.timestamp`                  | `number` (optional) | Unix timestamp                                                                                                                                                                                    |
  | `spend.exchangeRate`               | `number` (optional) | Exchange rate applied                                                                                                                                                                             |
  | `spend.iso8583.de41`               | `string` (optional) | Terminal ID (ISO 8583 Data Element 41)                                                                                                                                                            |

  #### Example Payload

  ```json theme={null}
  {
      "resource": "transaction",
      "action": "requested",
      "version": "1.0.0",
      "body": {
          "id": "txn_abc123",
          "type": "spend",
          "spend": {
              "amount": 2500,
              "currency": "USD",
              "localAmount": 2250,
              "localCurrency": "EUR",
              "authorizedAmount": 7500,
              "previouslyAuthorizedAmount": 5000,
              "merchantName": "HOTEL MARRIOTT",
              "merchantCity": "New York",
              "merchantCountry": "US",
              "merchantCategory": "Hotels and Motels",
              "merchantCategoryCode": "7011",
              "cardId": "card_123",
              "cardType": "virtual",
              "companyId": "company_456",
              "userId": "user_789",
              "userFirstName": "John",
              "userLastName": "Doe",
              "userEmail": "john.doe@example.com",
              "status": "pending",
              "authorizedAt": "2026-01-27T15:30:00.000Z",
              "exchangeRate": 1.11
          }
      }
  }
  ```

  #### Responding to the Webhook

  <Info>
    To approve an incremental authorization, evaluate `amount`, the new funds being requested. `authorizedAmount` tells you the total exposure on the hold after approval.
  </Info>

  You can approve or decline the incremental authorization by returning an appropriate response:

  **Approve:**

  ```json theme={null}
  {
      "success": true
  }
  ```

  **Decline:**

  ```json theme={null}
  {
      "success": false,
      "rejectionCode": "insufficient_funds"
  }
  ```
</Update>
