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

<Update label="v1.1.0" description="Add contractAddress field">
  ### transaction.created webhook (collateral)

  Added the `contractAddress` field to the `transaction.created` collateral webhook payload. This field returns the on-chain contract address that holds funds for deposits and withdrawals. You can use this address to cross-reference the collateral pool's on-chain state during reconciliation.

  #### Payload Fields

  | Field                             | Type                | Description                                                       |
  | --------------------------------- | ------------------- | ----------------------------------------------------------------- |
  | `id`                              | `string`            | Webhook ID                                                        |
  | `resource`                        | `string`            | Always `"transaction"`                                            |
  | `action`                          | `string`            | Always `"created"`                                                |
  | `version`                         | `string`            | The webhook version                                               |
  | `body.id`                         | `string`            | The transaction ID                                                |
  | `body.type`                       | `string`            | Always `"collateral"` for this webhook                            |
  | `body.collateral.amount`          | `number`            | Collateral amount (may include decimals for native token amounts) |
  | `body.collateral.currency`        | `string`            | Asset name in lowercase (e.g., `usdc`, `usdt`)                    |
  | `body.collateral.chainId`         | `number`            | Blockchain chain ID (e.g., `1` for Ethereum mainnet)              |
  | `body.collateral.walletAddress`   | `string`            | Wallet address the collateral was sent from                       |
  | `body.collateral.transactionHash` | `string`            | On-chain transaction hash                                         |
  | `body.collateral.companyId`       | `string` (optional) | Company ID (for corporate accounts)                               |
  | `body.collateral.userId`          | `string` (optional) | User ID (for consumer accounts)                                   |
  | `body.collateral.postedAt`        | `string`            | ISO 8601 timestamp when the collateral was posted on-chain        |
  | `body.collateral.contractAddress` | `string`            | The collateral contract address holding the funds                 |

  #### Example Payload

  ```json theme={null}
  {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "resource": "transaction",
      "action": "created",
      "version": "1.1.0",
      "body": {
          "id": "txn_abc123",
          "type": "collateral",
          "collateral": {
              "amount": 100000,
              "currency": "usdc",
              "chainId": 1,
              "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
              "transactionHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
              "companyId": "company_456",
              "postedAt": "2026-01-27T15:30:00.000Z",
              "contractAddress": "0x9876543210fedcba9876543210fedcba98765432"
          }
      }
  }
  ```
</Update>

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

  Added the `transaction.created` webhook for collateral transactions. This webhook is triggered when collateral is deposited on-chain, such as when a user or company adds digital-asset collateral to back their credit line.

  #### Payload Fields

  | Field                             | Type                | Description                                                       |
  | --------------------------------- | ------------------- | ----------------------------------------------------------------- |
  | `id`                              | `string`            | Webhook ID                                                        |
  | `resource`                        | `string`            | Always `"transaction"`                                            |
  | `action`                          | `string`            | Always `"created"`                                                |
  | `version`                         | `string`            | The webhook version                                               |
  | `body.id`                         | `string`            | The transaction ID                                                |
  | `body.type`                       | `string`            | Always `"collateral"` for this webhook                            |
  | `body.collateral.amount`          | `number`            | Collateral amount (may include decimals for native token amounts) |
  | `body.collateral.currency`        | `string`            | Asset name in lowercase (e.g., `usdc`, `usdt`)                    |
  | `body.collateral.chainId`         | `number`            | Blockchain chain ID (e.g., `1` for Ethereum mainnet)              |
  | `body.collateral.walletAddress`   | `string`            | Wallet address the collateral was sent from                       |
  | `body.collateral.transactionHash` | `string`            | On-chain transaction hash                                         |
  | `body.collateral.companyId`       | `string` (optional) | Company ID (for corporate accounts)                               |
  | `body.collateral.userId`          | `string` (optional) | User ID (for consumer accounts)                                   |
  | `body.collateral.postedAt`        | `string`            | ISO 8601 timestamp when the collateral was posted on-chain        |

  #### Example Payload

  ```json theme={null}
  {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "resource": "transaction",
      "action": "created",
      "version": "1.0.0",
      "body": {
          "id": "txn_abc123",
          "type": "collateral",
          "collateral": {
              "amount": 100000,
              "currency": "usdc",
              "chainId": 1,
              "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
              "transactionHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
              "companyId": "company_456",
              "postedAt": "2026-01-27T15:30:00.000Z"
          }
      }
  }
  ```
</Update>
