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

# transactionReward.created

> Webhook triggered when a Raindrops reward is created for a transaction

<Update label="v1.1.0" description="Add rewardUnit field">
  ### rewardUnit field added

  Added the `rewardUnit` field to the `transactionReward.created` webhook payload. This field clarifies that `rewardAmount` is denominated in whole reward points, and is always `points`. You receive this field only if your tenant is opted in to webhook version `1.1.0` or later; earlier versions never include it.

  #### New Field

  | Field             | Type     | Description                                                             |
  | ----------------- | -------- | ----------------------------------------------------------------------- |
  | `body.rewardUnit` | `string` | The unit of `body.rewardAmount`. Always `points` (whole reward points). |

  #### Example Payload

  ```json theme={null}
  {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "resource": "transactionReward",
      "action": "created",
      "version": "1.1.0",
      "body": {
          "id": "txn_789xyz012abc",
          "userId": "usr_def456ghi789",
          "rewardAmount": "200",
          "rewardUnit": "points"
      },
      "eventReceivedAt": "2026-06-30T02:30:00.000Z"
  }
  ```
</Update>

<Update label="v1.0.0" description="initial release">
  ### transactionReward.created webhook

  Added the `transactionReward.created` webhook. Rain sends this webhook after a card transaction settles and records the final reward. It carries the awarded points so you can mint the corresponding points to your end user on-chain. Rain sends it only for partner-managed on-chain tenants (`PARTNER_ONCHAIN`), once per card transaction. Rain does not send it for `RAIN_MANAGED` or `PARTNER_OFFCHAIN` tenants, or when a transaction earns zero points.

  Because the reward is final when the card transaction settles, it is terminal the moment Rain sends this webhook. Rain does not run a later step or emit any follow-up event for the reward, so mint the corresponding points to your end user as soon as you receive it.

  #### Payload Fields

  | Field               | Type                | Description                                    |
  | ------------------- | ------------------- | ---------------------------------------------- |
  | `id`                | `string`            | Webhook ID                                     |
  | `resource`          | `string`            | Always `"transactionReward"`                   |
  | `action`            | `string`            | Always `"created"`                             |
  | `version`           | `string`            | The webhook version                            |
  | `body.id`           | `string`            | The card transaction ID that earned the reward |
  | `body.userId`       | `string`            | The ID of the user who earned the reward       |
  | `body.rewardAmount` | `string`            | The awarded reward amount, in points           |
  | `eventReceivedAt`   | `string` (optional) | ISO-8601 timestamp                             |

  #### Example Payload

  ```json theme={null}
  {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "resource": "transactionReward",
      "action": "created",
      "version": "1.0.0",
      "body": {
          "id": "txn_789xyz012abc",
          "userId": "usr_def456ghi789",
          "rewardAmount": "200"
      },
      "eventReceivedAt": "2026-06-30T02:30:00.000Z"
  }
  ```
</Update>
