Faith Forge LabsAustria

A partial refund should not close the whole order

A payment provider can process the requested refund correctly while the business's own screen describes the wrong result. The fault may lie in the connection's interpretation: one successful refund is treated as proof that an entire order has been refunded.

This fictional exercise uses an €84 order containing a €60 materials kit and a €24 workbook. The business approves cancellation of the workbook before fulfilment and authorises its €24 refund. The materials kit remains ordered. The example concerns representation and review in an isolated environment; it does not establish a customer's refund entitlement or prescribe accounting treatment.

Write down the independent facts

Order O-84 contains two lines, K-60 and W-24. Payment P-84 covers the total. The approved cancellation applies to W-24 only. The fulfilment instruction for K-60 remains active.

Refund R-24 is linked to P-84 and records €24 with a provider-reported successful state. In the fictional provider view, the original paid amount is €84 and the successful refunded amount is €24. The business therefore still retains €60 against the order. The local screen nevertheless says “Fully refunded” and hides the remaining preparation task.

Evidence What it establishes What it does not establish
Approved cancellation of W-24 The workbook line is cancelled The kit line is cancelled
R-24 reported successful for €24 That refund's recorded result The whole €84 has been refunded
K-60 remains active The kit still requires fulfilment under the approved order A payment event may change its contents
Customer-facing refund notice The wording the customer receives The date funds become visible in every bank account

Keep those distinctions visible before inspecting the code. Otherwise a repair can unintentionally change the commercial decision while trying to correct a display.

Locate the faulty interpretation

The inspected connection contains a simple rule: when any related refund reports success, mark the order fully refunded. It does not compare the successful refund amount with the original payment. The same rule also suppresses the fulfilment task for every line.

The source refund record is correct. Repeating the refund would not repair the interpretation and could create a new financial problem. The defect lies in the local mapping from provider facts to the business view.

In the corrected fixture, the payment summary shows the original amount, the successful refunded amount and the remaining amount separately. The order displays “Partially refunded: €24 of €84.” K-60 remains in the preparation queue, while W-24 remains cancelled. Neither line acquires its state merely from the existence of a refund object.

Use the actual provider contract

Stripe's refund documentation distinguishes partial refunds and permits more than one refund against a charge, subject to the original amount. Its Refund object reference identifies a refund's amount, related payment and status. These facts support the example's need to inspect the actual object and amount; they are not a promise that every payment provider uses the same fields or lifecycle.

A real implementation needs the current contract for its provider and account. A requested, pending, failed or successful refund can require different treatment. The business view should say which state it has evidence for, rather than report money returned simply because a request was accepted for processing.

The formatted euro amount is a presentation of the agreed financial value. The connection should preserve currency and amount together, using the provider's required representation. Do not use a translated status label or a string formatted for display as the authority for financial calculations.

Test the cases that distinguish partial from full

The first corrected test replays the fixture's read of R-24. The local summary remains €24 refunded and €60 retained. Reading the same refund again must not count it as a second independent refund. The system uses the provider's actual identifiers and supported reconciliation approach.

A separate test makes R-24 pending. The view reports the pending refund and does not add it to the amount represented as successfully refunded. A failed result similarly remains a failure requiring the agreed operational review. The test does not silently create another refund attempt.

Finally, an explicitly authorised second fixture refund R-60 succeeds for the remaining €60. The successful total is now €84, so the payment view can report the full original amount refunded. That does not, by itself, rewrite fulfilment history or establish what happened to the materials kit. The business must separately decide and record any change to that line.

An unrelated order O-85 remains unchanged throughout. It supplies a useful control against an update accidentally applied to a customer account rather than the intended payment and order.

Close the investigation with a usable staff view

The fictional correction ends with O-84 accurately described after R-24: partially refunded, workbook cancelled, kit still awaiting preparation. The receiving staff member can explain the remaining work from the screen without interpreting raw provider events. The later full-refund test demonstrates a distinct financial outcome without pretending that payment state decides every business action.

The review record identifies the source evidence, affected local rule, successful tests and provider limitations. Any real historic records affected by the old mapping need a separately planned reconciliation; the fixture does not establish that they have been corrected.

Online sales development can include this kind of exception handling. Bring the approved business decision and the provider's recorded result, with sensitive details removed, when discussing a payment connection.