Closed usamaadev closed 1 day ago
Hi @usamaadev, thanks for the post, but this is an intended validation. In order to create a refund, the Order balance has to be below 0, meaning an item was returned, or something else edited. We might revisit this behavior in the future, but we'll keep it as it is for now, considering it has some accounting implications that make this trickier than it seems to be.
Package.json file
Node.js version
v20.9.0
Database and its version
PostgreSQL 17.0
Operating system name and version
Ubuntu 22.04.4 LTS
Browser name
No response
What happended?
When attempting to process a refund on an order with a captured payment, the system throws the following error:
Order does not have an outstanding balance to refund
Steps to Reproduce:
Expected behavior
The refund should process without errors, allowing the amount to be returned to the customer.
Actual behavior
The system blocks the refund process and shows the error message: Order does not have an outstanding balance to refund.
Additional Context:
Link to reproduction repo
Cloned new with 2.0.7