v2025-01-01
- Overview
- Orders
- Payments
- Payment Links
- Refunds
- Customers
- Payment Methods
- Offers
- Settlements
- Simulation
- Utilities
Card Token Webhook
Receive asynchronous notifications for updates on an instrument.
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. |
Instrument active webhook
An instrument active webhook is triggered when a card is tokenised successfully from the networks like visa, mastercard, etc.
Instrument Active Webhook
Copy
{
"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"
}
Instrument Active Webhook
Copy
{
"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"
}
Instrument failed webhook
An instrument failed webhook is triggered when a card was not tokenised from the networks like visa, mastercard, etc.
Instrument Failed Webhook
Copy
{
"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"
}
Instrument Failed Webhook
Copy
{
"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"
}
Payload field description
Field | Description | Example |
---|---|---|
customer_id (String) | The customer ID associated with the save instrument request. It is sent by the merchant as a part of create order request in the customer ID field. | user199721 |
afa_reference (String) | cf_payment_id of the successful transaction done while saving instrument. | 887316963 |
instrument_id (String) | The reference ID of the saved instrument. Unique for a save instrument request but not unique for a particular instrument like card number. | af250dc5-e5e5-4e7d-a7cf-3f446741fa54 |
instrument_type (String) | Type of instrument - card | card |
instrument_uid (String) | Unique identifier for the instrument. For example, if a same card is saved by 2 different customers the instrument_uid would be same for both the cards. | 680cd7171583f9f64b426983d4501d6941b462932ce5f626be78392d5ec42660 |
instrument_display (String) | The display text for the saved instrument. For example, in case of saved cards the first 12 digits would be masked and only the last 4 digits would be visible in the instrument display string. It can be displayed to the customer for selecting a saved instrument for payment. | XXXXXXXXXXXX6854 |
instrument_status (String) | The status of saved instrument - INACTIVE, ACTIVE | ACTIVE |
added_at (String) | Timestamp at which instrument was saved. | 2022-04-14T10:42:59+05:30 |
card_network (String) | The card network to which the saved card belongs. Visa, Mastercard, Rupay, etc. | visa |
card_bank_name (String) | Card issuing bank name. | HDFC BANK |
card_country (String) | Card issuing country code. | IN |
card_type (String) | debit, credit, prepaid, etc. | debit |
card_token_details (Object) | Additional card token details like card token expiry, card token would be passed in this object. Note: Currently, the field is always passed as null. | null |
event_time (String) | Time at which webhook was initiated. | 2022-02-28T13:04:28+05:30 |
type (String) | Type of the instrument webhook. | INSTRUMENT_ACTIVE_WEBHOOK |
Assistant
Responses are generated using AI and may contain mistakes.