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

# Wallet Webhooks

> Configure Cashfree wallet webhooks to receive credit and debit event notifications in your prepaid instrument integration.

Cashfree sends event-based notifications when a wallet event occurs.

<Warning>
  In rare cases, such as network retries, read timeouts, processing delays, or delivery failures, the same webhook might be sent more than once for the same event. To prevent unintended side effects, implement idempotency in your webhook handler to handle duplicate deliveries.
</Warning>

## Webhook signature

You receive the webhook signature in the webhook header. The following table shows a sample header from a webhook request.

| Header name | Header value |
| - | :-: |
| `content-length` | 1099 |
| `x-webhook-attempt` | 1 |
| `content-type` | application/json |
| `x-webhook-signature` | 07r5C3VMwsGYeldGOCYxe5zoHhIN1zLfa8O0U/yngHI= |
| `x-webhook-timestamp` | 1746427759733 |
| `x-webhook-version` | 2025-01-01 |

<Tip> Always capture the webhook payload in its raw text format before parsing into JSON. Parsing and reserialising the payload can change the structure (for example, array ordering, spacing, or `null` handling) and cause a signature mismatch during verification. Use the exact raw body string from the request when computing the signature.</Tip>

## Wallet credit events

Cashfree sends the following event when a wallet credit succeeds:

| Event | Description |
| :- | :- |
| `PPI_CREDIT_SUCCESS` | The credit completes successfully and Cashfree adds funds to the sub-wallet. |

The following example shows a `PPI_CREDIT_SUCCESS` webhook for a `GIFT_PPI` sub-wallet. The `issued_gift_codes` array appears only for gift wallets.

<CodeGroup>
  ```json PPI_CREDIT_SUCCESS theme={"dark"}
  {
    "event_type": "PPI_CREDIT_SUCCESS",
    "event_time": "2006-01-02T15:04:05Z",
    "data": {
      "credit_id": "CREDIT126345",
      "cf_credit_id": "8901234567890123456",
      "wallet_id": "WALLET936721",
      "user_id": "USER827364",
      "amount": 100.5,
      "sub_wallet": {
        "cf_sub_wallet_id": "35246543210987654321",
        "name": "Gift Wallet",
        "type": "GIFT_PPI",
        "status": "ACTIVE",
        "balance": 1500.75
      },
      "issued_gift_codes": [
        {
          "code": "GIFT-2025-XYZ123",
          "value": 100.5,
          "expiry": "2025-12-31T23:59:59Z"
        }
      ],
      "status": "SUCCESS",
      "remarks": "Refund for order 123",
      "initiated_at": "2025-09-02T10:15:30Z",
      "processed_at": "2025-09-02T10:20:45Z"
    }
  }
  ```
</CodeGroup>

## Wallet credit webhook payload fields

The webhook payload contains important metadata in its top-level fields.

| Field | Type | Description |
| - | - | - |
| `event_type` | `string` | Indicates the type of event that triggered the webhook. Possible value: `PPI_CREDIT_SUCCESS`. |
| `event_time` | `string` | The UTC timestamp of when the event occurred, formatted in ISO 8601 (`YYYY-MM-DDTHH:MM:SSZ`). |
| `data` | `object` | Contains credit-specific details. The object matches the successful [Credit Wallet API](/docs/api-reference/prepaid-payment-instruments/wallet-management/credit-wallet) response. |

## Wallet debit events

Cashfree sends a debit webhook when a wallet debit completes with `SUCCESS`. Webhooks are not sent while the debit is `PENDING` (for example, while OTP verification is in progress). For `SMALL_PPI` and `FULL_KYC_PPI` sub-wallets, the webhook is sent after you complete verification with the [Verify Debit Wallet API](/docs/api-reference/prepaid-payment-instruments/wallet-management/verify-debit-wallet).

Cashfree sends the following event when a wallet debit succeeds:

| Event | Description |
| :- | :- |
| `PPI_DEBIT_SUCCESS` | The debit completes successfully and Cashfree deducts funds from the sub-wallet. |

The webhook `data` object uses `status` and `status_code` of `SUCCESS`. For other combinations returned by the Debit Wallet and Verify Debit Wallet APIs, see [Status and status-code reference](/docs/api-reference/prepaid-payment-instruments/wallet-management/debit-status-descriptions#status-and-status-code-reference).

The following example shows a `PPI_DEBIT_SUCCESS` webhook for a `GIFT_PPI` sub-wallet. The `applied_gift_codes` array appears only for gift wallets.

<CodeGroup>
  ```json PPI_DEBIT_SUCCESS theme={"dark"}
  {
    "event_type": "PPI_DEBIT_SUCCESS",
    "event_time": "2025-07-28T10:30:00Z",
    "data": {
      "debit_id": "DEBIT420984",
      "user_id": "USER827364",
      "cf_debit_id": "8901234567890123456",
      "wallet_id": "WALLET936721",
      "sub_wallet": {
        "cf_sub_wallet_id": "35246543210987654321",
        "name": "Gift Wallet",
        "type": "GIFT_PPI",
        "status": "ACTIVE",
        "balance": 1500.75,
        "available_balance": 1500.75,
        "funds_on_hold": 0.0
      },
      "applied_gift_codes": [
        {
          "code": "GHO-8900-HKDH-8899",
          "amount_debited": 100.00,
          "value": 100.00,
          "expiry": "2026-07-28T10:30:00Z"
        },
        {
          "code": "NMK-8454-JKJD-4224",
          "amount_debited": 500.00,
          "value": 600.00,
          "expiry": "2026-07-28T10:30:00Z"
        }
      ],
      "status": "SUCCESS",
      "status_code": "SUCCESS",
      "amount": 600.00,
      "remarks": "Purchase of electronics item",
      "initiated_at": "2025-07-28T10:30:00Z",
      "processed_at": "2025-07-28T10:30:00Z",
      "notes": {
        "example_key1": "example_value1",
        "example_key2": "example_value2"
      }
    }
  }
  ```
</CodeGroup>

## Wallet debit webhook payload fields

The webhook payload contains important metadata in its top-level fields.

| Field | Type | Description |
| - | - | - |
| `event_type` | `string` | Indicates the type of event that triggered the webhook. Possible value: `PPI_DEBIT_SUCCESS`. |
| `event_time` | `string` | The UTC timestamp of when the event occurred, formatted in ISO 8601 (`YYYY-MM-DDTHH:MM:SSZ`). |
| `data` | `object` | Contains debit-specific details. The object matches the successful [Debit Wallet API](/docs/api-reference/prepaid-payment-instruments/wallet-management/debit-wallet) or [Verify Debit Wallet API](/docs/api-reference/prepaid-payment-instruments/wallet-management/verify-debit-wallet) response. |

<Note>
  Verify the signature before you process any webhook payload. For more information, see [Webhook signature verification](/docs/api-reference/prepaid-payment-instruments/webhook-signature-verification#webhook-signature-verification).
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.