How It Works
When partial payment is enabled, TeraWallet calculates the available balance and applies it as a negative fee to the WooCommerce cart. This effectively reduces the “Total” that needs to be collected by other payment methods.Checkout Flow Example
Here is a step-by-step example of how a partial payment transaction works:- User Balance: The customer has $100 in their wallet.
- Cart Total: The customer adds items worth $300 to their cart.
- Applying Balance: On the checkout page, the user chooses to use their wallet balance.
- Calculated Totals:
- Subtotal: $300
- Wallet Deduction (Via Wallet): -$100
- New Total to Pay: $200
- Final Payment: The customer pays the remaining $200 using their preferred gateway (e.g., Credit Card).
- Post-Payment:
- WooCommerce marks the order as paid.
- TeraWallet debits $100 from the customer’s wallet ledger.
- The ledger entry will show: “For order payment #1234 (Partial)”.
Auto-Deduct Feature
Administrators can enable Auto-Deduct in the settings. When active:- The maximum available wallet balance is automatically applied as a discount when the customer reaches the checkout page.
- The customer doesn’t need to manually toggle the option.
Tax Treatment
New in 1.6.4. Set this under TeraWallet → Settings → General → Partial Payment.
- Wallet pays goods only (default) — the wallet fee is clamped to the ex-tax subtotal and tax is charged on the order. Correct when wallet top-ups are not taxed at load.
- Wallet pays the whole order including tax — the wallet fee is taxable, so the wallet can cover the tax line too. Use this only when top-ups are taxed when the customer loads them.
When the Wallet is Debited
New in 1.6.4. “Deduct wallet balance” timing, under Settings → General → Partial Payment.
- At order placement (default) — the wallet portion is debited immediately when the order is created.
- When payment completes — the wallet is debited only once the order reaches a paid status, so
abandoned or failed orders never leave the wallet debited. If the balance was already spent
elsewhere before payment cleared, the order is placed on-hold and the
woo_wallet_partial_payment_debit_failedaction fires instead of overdrafting the wallet.
Refund Logic for Partial Payments
If an order paid partially is cancelled, the full wallet portion is credited back automatically. Since 1.6.4, partial WooCommerce refunds are also handled: TeraWallet returns a proportional share of the wallet payment to the customer’s balance — capped so the cumulative refund can never exceed the original wallet debit, and idempotent per refund.- Refunds reverse the exact base-currency amount originally debited, so multi-currency stores see no phantom FX gain or loss.
- You can opt out per store with Refund wallet on partial refunds, or override the amount with
the
woo_wallet_partial_payment_refund_amountfilter. - The remaining amount (paid via the secondary gateway) must still be refunded separately by the administrator within that gateway’s interface.
Important Notes
- Insufficient Balance: If the wallet balance is zero, the partial payment option will not appear.
- Full Payment: If the wallet balance is greater than or equal to the order total, the user can pay for the entire order using the Wallet Gateway directly, and no other payment method is required.
- Top-up Conflict: Partial payments cannot be used if the customer is currently attempting to buy a “Wallet Topup” product.
Partial payments are implemented as a non-taxable negative fee in WooCommerce, ensuring that tax calculations on the remaining items are not affected.
