Urgent.News

What's breaking now, across thousands of outlets.

Tech

Why your order system and your payment provider disagree

Twice a month somebody in operations finds a number that doesn't match. An order recorded at €120.00 against a capture of €119.40. Or an order with no payment at all. Or, the one that ruins the afternoon, a refund larger than anything that was ever collected. Then a week goes by. Operations says the payment system is wrong, engineering says the order system is wrong, somebody exports both into a…

Twice a month, operations staff stumble upon discrepancies between orders and payment captures. Sometimes, an order shows a €120 total but only captures €119.40, while other times, there's no payment at all. The most disconcerting scenario is a refund exceeding the collected amount. After a week of back-and-forth between operations and engineering teams, a decision is made, but it's rarely because the root cause was identified.

This issue happens in various industries, including banking, healthcare, gaming, and public administration.

There are four primary reasons these discrepancies occur, and they all resemble each other at first glance. Each case requires a distinct solution. The first reason is when a customer adds items to their cart, pays more than the initial amount, and the systems don't record this change. Two exports on different days show a €30 difference, and neither system is at fault. The solution is to add identifiers to each version of a basket so that discrepancies are instantly apparent.

The second reason is when a €150 order is captured as €100 and then €50. A spreadsheet will incorrectly show a €50 missing payment or an unexpected payment, but both interpretations are wrong. The fix is to recognize that any total comparison will always flag this issue, so teams learn to disregard these reports. The third reason is when a payment appears twice in the records, yet the order total remains unchanged. The fix is to establish which source is authoritative for each type of record and document it clearly.

The fourth and most insidious reason is when a payment record is missing entirely. This can happen due to a failed webhook, a nightly export that didn't capture the transaction in time, or a manual refund issued outside the order system. This discrepancy is the most challenging to resolve, as it's not a matter of fixing a figure but rather understanding why a record is missing. The solution is to identify the root cause of the missing record and ensure that communication between systems is reliable.

The key to resolving these issues lies in proper record-keeping and comparison. Teams must establish rules for handling multiple versions of the same basket, multiple payments from a single source, and missing records. Without clear guidelines, teams will continue to waste time arguing over which system is at fault. The solution is to let the comparison system handle the discrepancies, refusing to make assumptions or guesses.

By doing so, teams can quickly identify the root cause and implement an appropriate solution, saving valuable time and avoiding the week-long debate that often ensues.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Saturday 19 September →