Incorrect Remaining Balance in Debit Entry

Free plugin Unanswered

Incorrect Remaining Balance in Debit Entry

Started by sanjay.modi TeraWallet – Best WooCommerce Wallet System 3 months, 2 weeks ago
Tagged:

Conversation

1 posts · 1 voices
Viewing 1 post (of 1 total)
  • January 2, 2026 at 9:34 am #8690

    Hello Tera Wallet Team,
    We are observing an incorrect remaining balance calculation issue in wallet debit entries. Below is a detailed example for your reference:
    Scenario / Steps:
    User wallet balance was ₹0
    User performed a recharge of ₹25
    User initiated a chat session
    Chat ended with a total deduction of ₹23.60000000
    Expected Calculation:
    Recharge Amount: ₹25.00
    Chat Deduction: ₹23.60000000
    Expected Remaining Balance: ₹1.40000000
    Actual Issue Observed:
    Debit Entry Amount: ₹23.60000000 (Correct)
    Remaining Balance shown in debit entry: ₹26.40000000 (Incorrect)
    Instead of showing ₹1.40, the system is reflecting ₹26.40 as the remaining balance, which is logically incorrect.

    Please let us know if logs, transaction IDs, or additional details are required from our side.

    MY code of debit api call back function

    public function debitCustomerWalletAmountCallBackFun($request)
    {
    // Verify API token
    $apiVerify = $this->helper->verifyApiToken();
    if (!empty($apiVerify[‘message’])) {
    return $this->helper->generateResponse($apiVerify, $this->helper->UNAUTHORIZED);
    }
    // Extract request parameters
    $customerId = $request[‘customerId’];
    $debitAmount = $request[‘debitAmount’];
    $commentMsg = $request[‘commentMsg’];

    // Debit the customer’s wallet
    woo_wallet()->wallet->debit($customerId, $debitAmount, $commentMsg);
    }

Viewing 1 post (of 1 total)

Post a reply

Paste the exact error, your WooCommerce + WordPress versions, and any relevant steps. Screenshots help.

Sign in to reply

You must be logged in to reply to this topic.

Still stuck?

Three fast ways to keep moving if the thread above didn't resolve it.