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

# Debit Status and Status-Code Mapping

> Understand debit status and status_code combinations returned by PPI Debit Wallet and Verify Debit Wallet APIs, with recommended actions for each scenario.

Use this reference to understand the `status` and `status_code` values returned by the [Debit Wallet API](/docs/api-reference/prepaid-payment-instruments/wallet-management/debit-wallet) and [Verify Debit Wallet API](/docs/api-reference/prepaid-payment-instruments/wallet-management/verify-debit-wallet), and configure your debit flow accordingly.

<span id="status-statuscode-mapping" />

## Status and status-code reference

The following table describes all possible `status` and `status_code` combinations returned by debit APIs, along with recommended actions for each scenario.

### Debit transaction statuses

Statuses are organised by transaction state. Each state contains specific status codes that indicate the current progress and required actions.

<Accordion title="PENDING - Debit in progress">
  | Status code | Description | Recommended action |
  | - | - | - |
  | `PENDING` | Cashfree received the debit request and is processing it. | Wait for a terminal status or poll using the debit response |
  | `OTP_GENERATED` | Cashfree sent an OTP to the user for debit authorisation. | Call the [Verify Debit Wallet API](/docs/api-reference/prepaid-payment-instruments/wallet-management/verify-debit-wallet) with the `debit_id` and OTP |
  | `LAST_OTP_ATTEMPT_FAILED` | The OTP verification attempt failed, but retries remain. | Prompt the user to re-enter the OTP and call the [Verify Debit Wallet API](/docs/api-reference/prepaid-payment-instruments/wallet-management/verify-debit-wallet) again |
</Accordion>

<Accordion title="SUCCESS - Debit completed">
  | Status code | Description | Recommended action |
  | - | - | - |
  | `SUCCESS` | The debit completed successfully. | Proceed with order fulfilment or downstream processing |
</Accordion>

<Accordion title="FAILED - Debit failed">
  | Status code | Description | Recommended action |
  | - | - | - |
  | `OTP_GENERATION_FAILED` | Cashfree could not generate the OTP for the debit. | Retry the debit or verify notification channel configuration |
  | `OTP_VERIFICATION_FAILED` | The OTP verification failed. | Initiate a new debit if required |
  | `OTP_EXPIRED` | The OTP has expired. | Initiate a new debit |
  | `OTP_VERIFICATION_ATTEMPT_EXHAUSTED` | The maximum OTP verification attempts were exceeded. | Initiate a new debit |
  | `FAILED` | The debit failed. | Review the failure reason and retry if applicable |
</Accordion>

<Accordion title="REJECTED - Debit rejected">
  | Status code | Description | Recommended action |
  | - | - | - |
  | `REJECTED` | Cashfree rejected the debit. | Review the rejection reason before retrying |
  | `INSUFFICIENT_BALANCE` | The sub-wallet does not have sufficient balance for the debit. | Ask the user to top up the wallet or reduce the debit amount |
</Accordion>

<Accordion title="REVERSED - Debit reversed">
  | Status code | Description | Recommended action |
  | - | - | - |
  | `REVERSED` | Cashfree reversed the debit. | Update order or balance records accordingly |
</Accordion>


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