> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Card Token Webhook

> Receive asynchronous notification for updates on a card instrument, which is requested to be tokenised.

| Event                       | Description                                                        |
| --------------------------- | ------------------------------------------------------------------ |
| INSTRUMENT\_ACTIVE\_WEBHOOK | This webhook is triggered when the card is successfully tokenised. |
| INSTRUMENT\_FAILED\_WEBHOOK | This webhook is triggered when the card tokenisation fails.        |

For more information on how to configure webhooks, see [Webhook configuration](/payments/online/webhooks/configure).

## Instrument active webhook

<Tabs>
  <Tab title="Version (2025-01-01)">
    ```javascript Instrument active webhook theme={"dark"}
    {
       "data": {
          "instrument": {
             "customer_id": "siddhesh199721",
             "afa_reference": "887316963",
             "instrument_id": "af250dc5-e5e5-4e7d-a7cf-3f446741fa54",
             "instrument_type": "card",
             "instrument_uid": "680cd7171583f9f64b426983d4501d6941b462932ce5f626be78392d5ec42660",
             "instrument_display": "XXXXXXXXXXXX6854",
             "instrument_status": "ACTIVE",
             "added_at": "2022-04-14T10:42:59+05:30",
             "instrument_meta": {
                "card_network": "visa",
                "card_bank_name": "HDFC BANK",
                "card_country": "IN",
                "card_type": "credit",
                "sub_type": "R",
                "card_par": "50012ADWQZJKHCLXLT61QTYD5QNX1",
                "card_token_details": null
             }
          }
       },
       "event_time": "2022-04-14T10:44:14+05:30",
       "type": "INSTRUMENT_ACTIVE_WEBHOOK"
    }
    ```
  </Tab>
</Tabs>

## Instrument failed Webhook

<Tabs>
  <Tab title="Version (2025-01-01)">
    ```javascript Instrument failed webhook theme={"dark"}
    {
       "data": {
          "instrument": {
             "customer_id": "siddhesh199721",
             "afa_reference": "887316963",
             "instrument_id": "af250dc5-e5e5-4e7d-a7cf-3f446741fa54",
             "instrument_type": "card",
             "instrument_uid": "680cd7171583f9f64b426983d4501d6941b462932ce5f626be78392d5ec42660",
             "instrument_display": "XXXXXXXXXXXX6854",
             "instrument_status": "FAILED",
             "added_at": "2022-04-14T10:42:59+05:30",
             "instrument_meta": {
                "card_network": "visa",
                "card_bank_name": "HDFC BANK",
                "card_country": "IN",
                "card_type": "credit",
                "sub_type": "R",
                "card_par": null,
                "card_token_details": null
             }
          },
          "error_details": {
             "error_code": "NETWORK_ERROR",
             "error_description": "Error while processing the request",
             "error_source": "NETWORK"
          }
       },
       "event_time": "2022-04-14T10:44:14+05:30",
       "type": "INSTRUMENT_FAILED_WEBHOOK"
    }
    ```
  </Tab>
</Tabs>

<Accordion title="Understanding the payload">
  ## Payload field description

  | Field                | Description                                                                                                                                                                                                                                       | Type           |
  | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
  | customer\_id         | For checkout, this is the customer phone number and for seamless this is the customer ID provided by the merchant during the [Create Order API](/api-reference/payments/latest/orders/create) call, which is used to save cards for the customer. | `string`       |
  | afa\_reference       | Represents the `cf_payment_id` of the successful transaction done while saving the instrument.                                                                                                                                                    | `string`       |
  | instrument\_id       | Represents the identifier for the card saved at Cashfree.                                                                                                                                                                                         | `string`       |
  | instrument\_type     | Specifies the type of instrument. Available options: `card`.                                                                                                                                                                                      | `enum<string>` |
  | instrument\_uid      | Represents the unique identifier for the card, used to identify a specific card.                                                                                                                                                                  | `string`       |
  | instrument\_display  | Shows the last 4 digits of the actual card number.                                                                                                                                                                                                | `string`       |
  | instrument\_status   | Shows the status of the saved instrument. It is `ACTIVE` when the card is successfully tokenised, else `FAILED`. Available options: `ACTIVE`, `FAILED`.                                                                                           | `enum<string>` |
  | added\_at            | Shows the timestamp at which the instrument was attempted to be saved.                                                                                                                                                                            | `string`       |
  | card\_network        | Specifies the card scheme or network. Available options: `visa`, `mastercard`, `rupay`, `amex`, `diners`.                                                                                                                                         | `string`       |
  | card\_bank\_name     | Shows the issuing bank name of the card. Examples: `HDFC BANK`, `ICICI BANK`, `AXIS BANK`.                                                                                                                                                        | `string`       |
  | card\_country        | Shows the issuing country of the card. Example: `IN`.                                                                                                                                                                                             | `string`       |
  | card\_type           | Specifies the type of card. Available options: `credit`, `debit`, `prepaid`.                                                                                                                                                                      | `string`       |
  | sub\_type            | Specifies the sub-type of card. `R` = Retail, `P` = Premium, `C` = Corporate. Available options: `R`, `P`, `C`.                                                                                                                                   | `string`       |
  | card\_par            | Represents the [PAR](/payments/features/payment-account-reference) for the plain card. Appears only in instrument active webhook when the card is tokenised successfully.                                                                         | `string`       |
  | card\_token\_details | Always passed as null.                                                                                                                                                                                                                            | `object`       |
  | event\_time          | Shows the time at which the webhook is initiated.                                                                                                                                                                                                 | `string`       |
  | type                 | Specifies the type of the instrument webhook. Available options: `INSTRUMENT_ACTIVE_WEBHOOK`, `INSTRUMENT_FAILED_WEBHOOK`.                                                                                                                        | `string`       |
</Accordion>
