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

# card.created

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

  | Field      | Type                | Description                                                              |
  | ---------- | ------------------- | ------------------------------------------------------------------------ |
  | `currency` | `string` (optional) | The program's primary currency, lowercase ISO-4217 (for example, `usd`). |
</Update>

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

  Added the `card.created` webhook. Rain sends this webhook whenever a card is created, whether it was issued through the API or created internally by Rain.

  #### Payload Fields

  | Field                     | Type                | Description                                                                                                         |
  | ------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------- |
  | `id`                      | `string`            | Webhook ID                                                                                                          |
  | `resource`                | `string`            | Always `"card"`                                                                                                     |
  | `action`                  | `string`            | Always `"created"`                                                                                                  |
  | `version`                 | `string`            | The webhook version                                                                                                 |
  | `body.id`                 | `string`            | Rain card ID                                                                                                        |
  | `body.userId`             | `string`            | ID of the cardholder user                                                                                           |
  | `body.type`               | `string`            | `"virtual"` or `"physical"`                                                                                         |
  | `body.status`             | `string`            | Card status: `"active"`, `"locked"`, `"canceled"`, or `"notActivated"`                                              |
  | `body.limit`              | `object` (optional) | Spending limit configuration                                                                                        |
  | `body.limit.amount`       | `number`            | Limit amount in cents                                                                                               |
  | `body.limit.frequency`    | `string`            | `"per24HourPeriod"`, `"per7DayPeriod"`, `"per30DayPeriod"`, `"perYearPeriod"`, `"allTime"`, or `"perAuthorization"` |
  | `body.last4`              | `string`            | Last 4 digits of the card number                                                                                    |
  | `body.expirationMonth`    | `string`            | Card expiration month (no leading zero)                                                                             |
  | `body.expirationYear`     | `string`            | Card expiration year                                                                                                |
  | `body.cardCreationSource` | `string` (optional) | How the card was created: `api_initiated` or `rain_initiated`. Present when known.                                  |

  #### Example Payload

  ```json theme={null}
  {
      "id": "bda1b5ca-2bca-4c62-8e17-d80ee6f5aa59",
      "resource": "card",
      "action": "created",
      "version": "1.0.0",
      "body": {
          "id": "277a9918-d463-4bf2-a783-116d02cb9a51",
          "userId": "5086685d-3849-4ec8-bb94-6a2afb73663b",
          "type": "virtual",
          "status": "active",
          "limit": {
              "amount": 8000,
              "frequency": "per24HourPeriod"
          },
          "last4": "5600",
          "expirationMonth": "4",
          "expirationYear": "2032",
          "cardCreationSource": "api_initiated"
      }
  }
  ```
</Update>
