Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
174 stars 69 forks source link

Reserved funds aren't included in the total balance #9160

Open brucealdridge opened 3 months ago

brucealdridge commented 3 months ago

Describe the bug

Reserved funds are not included in the total balance this can give confusing results to merchants.

A recent case had a large deposit go out with a large reserve. It looks like total balance was calculated using the following formula.

(deposit-in-transit + upcoming-deposit) - funds-held-in-reserve - deposit-in-transit
For example: With a $5,000 deposit on the way, $4,000 held in reserve and $1,000 pending.

($5,000 + $1,000) - $4,000 - $5,000 = -$3,000

Total balance: -$3,000
Available Funds: $0

Total balance should be: $5,000 (funds-held-in-reserve + upcoming-deposit / $4,000 + $1000)

Additional context

p1721857566789549/1719606722.901469-slack-C3NCP7ZJ6

haszari commented 2 months ago

Marking as priority: low because reserve holds don't affect all merchants.

Possibly we have an enhancement idea to surface reserves more clearly to merchants, so I'm adding an enhancement label. If we do work on this we'd need to consider how we present reserves in the UI, so there's crossover with that future project.