The patient wallet is a non-cashable store of value earned through cashback on paid invoices, granted on referral conversion, or seeded by a refund-to-wallet. It applies at checkout as a payment method. Cashback reverses proportionally when an invoice is refunded; already-spent cashback is honoured and the unrecoverable delta is written off. Referral reward fires once on the referred patient's first paid invoice. This article is the operational guide for reception, accounts, and owners.

Where it lives#

  • Patient profile → Wallet: balance and transaction history. Per-row cashback expiry is recorded on the wallet transaction rows, not on the wallet header.
  • Sales → Invoice → Take payment → Wallet: the payment method.
  • Club → Cashback policy: rates and tiers.
  • Club → Referral program: referrer reward configuration.
  • Reports → Wallet: outstanding wallet liability per branch.

How wallet balance fills up#

  • Cashback: a percentage of the patient's paid invoice lands as wallet credit per the tenant's cashback policy. Earned at InvoicePaid.v2.
  • Referral reward: the referrer earns wallet credit and loyalty points when their referred patient makes their first paid invoice. Fires once per referral, idempotent on the referral state.
  • Refund-to-wallet: instead of cash back, a refund can post to the patient wallet. Used when the patient is continuing care.
  • Manual top-up: an owner can credit a wallet with reason. Always audited.

Paying with wallet at checkout#

  1. Open the invoice and click Take payment.
  2. Pick Wallet as the method.
  3. The system shows the available balance.
  4. Enter the amount to apply (default = full balance or remaining invoice, whichever is smaller).
  5. Save. The wallet decrements by the applied amount and the invoice partial-pays or fully-pays.

The wallet is non-cashable. It can settle invoices but cannot be paid out as cash. Reception does not need to count wallet usage at end-of-day; it does not touch the cash drawer.

Today only the non-cashable bucket can settle an invoice. The cashable and point buckets accumulate (cashback rules, point awards) but are not spendable at checkout yet. Spending those buckets is a roadmap item.

Refunding to the wallet instead of cash#

Coming soon. A single-button refund-to-wallet flow is on the roadmap. Do not record a cash refund unless cash was actually returned. Ask finance to use a supported, reconciled credit workflow; a separate wallet top-up does not automatically reverse the original payment.

If the patient is continuing care, a refund-to-wallet is faster than a card-back. Today this is a two-step routine: refund the invoice to cash, then create a wallet top-up for the same amount on the patient's wallet (owner-approved). A single-button refund-to-wallet flow is on the roadmap.

Owner top-up#

An owner can credit a patient wallet directly with a reason. Used for goodwill credits, settlement of disputes, or seeding the wallet on onboarding. Audited; the credit row carries the actor and reason. The credit posts to the wallet liability account.

Cashback reversal on refund#

When an invoice is refunded, cashback earned on the original invoice is reversed proportionally to the refund amount. The system honours the immutability of historical wallet transactions, so the reversal creates a new correction row rather than editing the original earn row.

Three buckets the system handles#

  • Pending cashback (earned but not yet spent): reverse the proportional share directly. A correction row with a negative amount posts to the wallet, the patient's balance drops by the reversed amount.
  • Partially used cashback (some of the earned cashback was applied to a later invoice): reverse the remaining unspent share; the spent share is honoured.
  • Fully spent cashback (the earned cashback was applied before the refund came in): the wallet cannot be made negative. The unrecoverable delta is logged as a write-off row on a "Cashback write-off" account so accounting sees the leakage.

Worked example#

  • Patient pays a 1000 AED invoice. 10 percent cashback policy applies, 100 AED lands on the wallet (pending).
  • The patient later uses 60 AED of that cashback on a smaller invoice.
  • Two weeks later the original 1000 AED invoice is refunded in full.
  • The cashback to reverse is 100 AED. The wallet has 40 AED of the unspent portion remaining; the system reverses 40 AED to the wallet.
  • The remaining 60 AED is unrecoverable; the system posts a write-off line for 60 AED with reason "Cashback write-off for refund of invoice X."

Referral reward on first paid invoice#

If patient A referred patient B, and patient B pays their first invoice, the system fires the referral reward once. The reward is the referrer's, not the referred patient's; the referred patient earns their own cashback per the standard cashback rule.

  • The referral state moves from REGISTERED to CONVERTED.
  • The referrer wallet credits with cashback (rate from the tenant referral policy).
  • The referrer earns loyalty points (rate from the points policy).
  • The reward is recorded on the first paid invoice of the referred patient. Idempotent on the referral state; a second matching event is a no-op.

For each role#

For reception#

  • Hand to the patient: "You have AED X on your wallet. Want to use it?" The system surfaces the balance on the invoice view.
  • Apply Wallet at checkout as you would any other payment method. Mix with cash, card, link as the patient wants.
  • Tell patients refund-to-wallet is faster than refund-to-card. Many prefer it.

For accountants#

  • Wallet liability is a real balance-sheet liability. Watch the outstanding-wallet report monthly.
  • Cashback expense (the cashback earned by patients in the period) hits the income statement at earn time.
  • Cashback write-offs post to their own account so leakage is visible. Investigate spikes; the usual cause is a refund pattern on a high-cashback product.
  • Referral reward expense follows the same pattern: earn at conversion, hit the income statement.
  • Wallet redemption uses a two-leg clearing pattern — same as POS Clearing or BNPL Clearing. When a patient pays with their wallet, the redemption listener posts Dr Wallet Liability / Cr Wallet Clearing, and the invoice posting completes with Dr Wallet Clearing / Cr Revenue. The clearing account always nets to zero at the end of the posting day; a non-zero balance signals a redemption that never settled into revenue and warrants investigation.
  • In the Revenue Quality report, the Settled with Liability Credit metric tells you how much of this month's revenue was funded by wallet (and gift card) redemption versus genuine new cash. Useful for cash-flow / runway conversations: liability-funded revenue is real revenue but the cash itself walked in months ago.

For owners#

  • Tune the cashback rate carefully. The whole rate is a discount on revenue; a refund-prone product at 20 percent cashback erodes margin fast.
  • Watch referral conversion rate. If referrals stop converting, the program is broken or stale.
  • Consider expiry on cashback (default 12 months) so the wallet liability does not balloon.

Payment method setup#

  • Wallet is a system-locked payment method. Its GL account is the wallet liability account.
  • The lock prevents accidentally deleting or repurposing the method. The label and the GL account can be reviewed by an owner; the lock cannot be removed.
  • Adjacent locked methods: Cash, Card, Refund. Each is seeded at clinic creation.

Common situations#

  • "Patient wants their wallet balance in cash." Not allowed. Wallet is non-cashable. The owner can authorise a one-off conversion to a cash refund, audited, but it is not a routine flow.
  • "Patient referred a friend who paid, but the referrer's wallet shows nothing." Check the referral state on the friend's profile. If still REGISTERED, the referral was not attached at the friend's first paid invoice; the system needs the link on the patient record. Owner can backfill the referral and re-fire the reward.
  • "Refund posted but the cashback did not reverse." The refund event must carry is_full_refund for the proportional reversal to fire; partial refunds reverse proportionally on the fraction. Check the refund record.
  • "Patient says they had AED 100 cashback and now it is gone." Pull the wallet ledger on their profile. The reversal row will name the source refund.

How wallet connects to the rest of the system#

  • Invoices and payments: wallet is a payment method.
  • Refunds and credit notes: trigger proportional cashback reversal.
  • Club, cashback, referrals: the source of wallet earn.
  • Accounting: wallet liability, cashback expense, referral expense, cashback write-off.
  • Notifications: cashback-earned and wallet-expiring messages.