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

<Update label="2026-04-03" description="payment-type collateral trigger">
  ### Additional trigger for payment-type contracts

  The `transaction.completed` webhook (payment type) is now also triggered when collateral is deposited to a payment-type contract. For these contracts, you receive both a `transaction.created` webhook with `type: "collateral"` and a `transaction.completed` webhook with `type: "payment"` when deposits are posted.
</Update>

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

  Added the `transaction.completed` webhook for payment transactions. This webhook is triggered when an on-chain payment has been settled and posted to the account.

  #### Payload Fields

  | Field                          | Type                | Description                                                          |
  | ------------------------------ | ------------------- | -------------------------------------------------------------------- |
  | `id`                           | `string`            | Webhook ID                                                           |
  | `resource`                     | `string`            | Always `"transaction"`                                               |
  | `action`                       | `string`            | Always `"completed"`                                                 |
  | `version`                      | `string`            | The webhook version                                                  |
  | `body.id`                      | `string`            | The transaction ID                                                   |
  | `body.type`                    | `string`            | Always `"payment"` for this webhook                                  |
  | `body.payment.amount`          | `number`            | Payment amount                                                       |
  | `body.payment.currency`        | `string`            | Currency code (e.g., `usd`)                                          |
  | `body.payment.chainId`         | `number`            | Blockchain chain ID (e.g., `1` for Ethereum mainnet)                 |
  | `body.payment.walletAddress`   | `string`            | Wallet address the payment was sent from (EIP-55 checksummed format) |
  | `body.payment.transactionHash` | `string`            | On-chain transaction hash                                            |
  | `body.payment.companyId`       | `string` (optional) | Company ID (for corporate accounts)                                  |
  | `body.payment.userId`          | `string` (optional) | User ID (for consumer accounts)                                      |
  | `body.payment.status`          | `string`            | Always `"completed"` for this webhook                                |
  | `body.payment.postedAt`        | `string`            | ISO 8601 timestamp when the payment was posted/settled               |

  #### Example Payload

  ```json theme={null}
  {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "resource": "transaction",
      "action": "completed",
      "version": "1.0.0",
      "body": {
          "id": "txn_abc123",
          "type": "payment",
          "payment": {
              "amount": 50000,
              "currency": "usd",
              "chainId": 1,
              "walletAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
              "transactionHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
              "companyId": "company_456",
              "status": "completed",
              "postedAt": "2026-01-27T16:45:00.000Z"
          }
      }
  }
  ```
</Update>
