Skip to main content
POST
/
ppi
/
wallet
/
debit
/
verify
Verify Debit Wallet
curl --request POST \
  --url https://api.cashfree.com/ppi/wallet/debit/verify \
  --header 'Content-Type: application/json' \
  --header 'x-api-version: <x-api-version>' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>' \
  --data '
{
  "debit_id": "DEBIT420984",
  "otp": "222113"
}
'
import requests

url = "https://api.cashfree.com/ppi/wallet/debit/verify"

payload = {
"debit_id": "DEBIT420984",
"otp": "222113"
}
headers = {
"x-api-version": "<x-api-version>",
"x-client-id": "<api-key>",
"x-client-secret": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'x-api-version': '<x-api-version>',
'x-client-id': '<api-key>',
'x-client-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({debit_id: 'DEBIT420984', otp: '222113'})
};

fetch('https://api.cashfree.com/ppi/wallet/debit/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cashfree.com/ppi/wallet/debit/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'debit_id' => 'DEBIT420984',
'otp' => '222113'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-version: <x-api-version>",
"x-client-id: <api-key>",
"x-client-secret: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.cashfree.com/ppi/wallet/debit/verify"

payload := strings.NewReader("{\n \"debit_id\": \"DEBIT420984\",\n \"otp\": \"222113\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-version", "<x-api-version>")
req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.cashfree.com/ppi/wallet/debit/verify")
.header("x-api-version", "<x-api-version>")
.header("x-client-id", "<api-key>")
.header("x-client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"debit_id\": \"DEBIT420984\",\n \"otp\": \"222113\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.cashfree.com/ppi/wallet/debit/verify")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-version"] = '<x-api-version>'
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"debit_id\": \"DEBIT420984\",\n \"otp\": \"222113\"\n}"

response = http.request(request)
puts response.read_body
{
  "debit_id": "DEBIT420984",
  "user_id": "USER827364",
  "cf_debit_id": "8901234567890123456",
  "wallet_id": "WALLET936721",
  "sub_wallet": {
    "cf_sub_wallet_id": "54252453468535350359",
    "name": "Small PPI Wallet",
    "type": "SMALL_PPI",
    "status": "ACTIVE",
    "balance": 9500.86,
    "available_balance": 1500.75,
    "funds_on_hold": 0
  },
  "status": "SUCCESS",
  "status_code": "SUCCESS",
  "amount": 600,
  "remarks": "Purchase of electronics item",
  "initiated_at": "2025-07-28T10:30:00Z",
  "processed_at": "2025-07-28T10:30:05Z",
  "notes": {
    "example_key": "example_value"
  }
}
Use this API to complete a debit transaction that requires OTP verification. Call this API after the Debit Wallet API returns status_code: OTP_GENERATED for SMALL_PPI or FULL_KYC_PPI sub-wallets. The request accepts two fields: debit_id and otp.
Refer to Status and status-code reference for a comprehensive list of status and status_code combinations.
A maximum of three verification attempts is allowed per debit_id. Further attempts return an error.

Authorizations

x-client-id
string
header
required

Your unique client identifier issued by Cashfree. You can find this in your Merchant Dashboard.

x-client-secret
string
header
required

The secret key associated with your client ID. Use this to authenticate your API requests. You can find this in your Merchant Dashboard.

Headers

x-api-version
string
default:2025-11-01
required

API version to be used. Format is in YYYY-MM-DD.

Example:

"2025-11-01"

Body

application/json

Request parameters to verify the OTP for a wallet debit request.

debit_id
string
required

Unique identifier for the debit transaction, as supplied when you created the debit via Debit Wallet (debit_id in that request).

Required string length: 1 - 50
Example:

"DEBIT420984"

otp
string
required

One-time password received by the end user on the notification channels configured in auth.data.notification_modes on the original Debit Wallet request.

Required string length: 4 - 10
Example:

"222113"

Response

Success response for verifying a wallet debit OTP.

debit_id
string

Unique identifier for the debit transaction, as provided by you during the debit request.

Example:

"DEBIT420984"

user_id
string

Unique identifier for the user, as provided by you during PPI user creation.

Example:

"USER827364"

cf_debit_id
string

Unique identifier for the debit transaction, generated by Cashfree.

Example:

"8901234567890123456"

wallet_id
string

Primary wallet ID from which the amount was debited.

Example:

"WALLET936721"

sub_wallet
object
applied_gift_codes
object[]

List of gift codes used in the transaction are applicable for GIFT type wallets.

status
enum<string>

Status of the debit transaction. Refer to Debit status and status-code mapping for all valid combinations.

  • For GIFT_PPI and CLOSED_LOOP_PPI sub-wallets, status is SUCCESS when the debit completes in a single call.
  • For SMALL_PPI and FULL_KYC_PPI sub-wallets, the Debit Wallet API returns status: PENDING and status_code: OTP_GENERATED until you verify the OTP using the Verify Debit Wallet API, after which status and status_code become SUCCESS.
Available options:
PENDING,
SUCCESS,
FAILED,
REJECTED,
REVERSED
Example:

"SUCCESS"

status_code
enum<string>

Status code for detailed tracking of debit progress. Refer to Debit status and status-code mapping for all valid combinations.

Available options:
PENDING,
OTP_GENERATED,
OTP_GENERATION_FAILED,
LAST_OTP_ATTEMPT_FAILED,
OTP_VERIFICATION_FAILED,
OTP_EXPIRED,
OTP_VERIFICATION_ATTEMPT_EXHAUSTED,
SUCCESS,
FAILED,
REJECTED,
REVERSED
Example:

"SUCCESS"

amount
number<double>

Amount that was debited.

Example:

600

remarks
string

Remarks for the debit transaction.

Example:

"Purchase of electronics item"

initiated_at
string<date-time>

Timestamp when the debit transaction was initiated.

Example:

"2025-07-28T10:30:00Z"

processed_at
string<date-time> | null

Timestamp when the debit transaction was processed. Returns null while the debit is awaiting OTP verification or is still in progress.

Example:

"2025-07-28T10:30:00Z"

notes
object

Optional key-value metadata for the debit transaction.

auth
object

Present only when you sent auth in the Debit Wallet request body for an OTP flow (SMALL_PPI or FULL_KYC_PPI). Echoes the same mode and data you supplied. Omitted for single-step debits (such as GIFT_PPI or CLOSED_LOOP_PPI).