<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ernest Yoyowah on Medium]]></title>
        <description><![CDATA[Stories by Ernest Yoyowah on Medium]]></description>
        <link>https://medium.com/@ernestyoyowah?source=rss-1fc63d894c7a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*f28357LSGdMxyZAQZSrd-Q.png</url>
            <title>Stories by Ernest Yoyowah on Medium</title>
            <link>https://medium.com/@ernestyoyowah?source=rss-1fc63d894c7a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 04:18:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ernestyoyowah/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Your Money Was Debited, but Never Arrived. Now What?]]></title>
            <link>https://ernestyoyowah.medium.com/your-money-was-debited-but-never-arrived-now-what-f8a0a416ebb0?source=rss-1fc63d894c7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8a0a416ebb0</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[bank-of-ghana]]></category>
            <category><![CDATA[fintech]]></category>
            <dc:creator><![CDATA[Ernest Yoyowah]]></dc:creator>
            <pubDate>Mon, 12 Oct 2026 23:21:38 GMT</pubDate>
            <atom:updated>2026-10-12T23:21:38.056Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Idempotency, transaction states, reversals, and reconciliation: how payment systems recover when things go wrong.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P5SMKn42H8hz_S-rHZ7f_A.png" /></figure><p>You send GHS 100 from your bank account to Ama’s Telecel Cash wallet.</p><p>Your bank account is debited.</p><p>You wait.</p><p>Nothing arrives in Ama’s wallet.</p><p>You check your phone again. Still nothing.</p><p>Then you receive a notification:</p><p><strong>Transaction failed.</strong></p><p>But your balance has already reduced by GHS 100.</p><p>Where is your money?</p><p>This is one of the most frustrating experiences a customer can have with digital payments. And from an engineering perspective, it’s one of the situations a payment system must be designed to handle safely.</p><p>In the previous article, we explored how a payment can fail at different points along its journey. We also saw how a transaction might succeed even when the system responsible for initiating it never receives the confirmation.</p><p>Now let’s look at what happens next.</p><h3>1. A Failed Transaction Doesn’t Always Mean the Money Is Lost</h3><p>When a customer reports a failed transaction, there are several possible explanations.</p><p>The payment instruction may never have reached the receiving institution.</p><p>The receiving institution may have rejected the request.</p><p>The payment may still be processing.</p><p>Or the receiving institution may have completed the payment, but the confirmation never reached the sending bank.</p><p>These are different situations, and the system must distinguish between them whenever possible.</p><p>Imagine the receiving wallet was credited successfully, but the response was lost.</p><p>If the bank immediately reverses the debit without checking the actual transaction outcome, it could restore GHS 100 to the sender even though Ama has already received the money.</p><p>Now the system has created a different financial problem.</p><p>This is why a timeout shouldn’t automatically trigger a reversal.</p><p><strong>Before deciding what to do with the money, the system needs to establish what happened to it.</strong></p><p>That sounds simple, but it requires careful transaction tracking and coordination between the systems involved.</p><h3>2. This Is Why Payment Systems Need Transaction States</h3><p>A payment system shouldn’t treat every transaction as simply successful or failed from the moment the request is initiated.</p><p>Consider a simplified transaction lifecycle:</p><ul><li><strong>Initiated:</strong> The customer has requested the payment.</li><li><strong>Processing:</strong> The system is attempting to complete the transaction.</li><li><strong>Successful:</strong> The payment has been confirmed as completed.</li><li><strong>Failed:</strong> The system has established that the payment did not complete.</li><li><strong>Pending or uncertain:</strong> The final outcome has not yet been established.</li></ul><p>These are illustrative states, not a universal status standard. Real payment systems may use different names and more detailed states.</p><p>The important distinction is between a confirmed failure and an unknown outcome.</p><p>Suppose the bank sends a payment instruction and waits for the receiving institution’s response.</p><p>The request times out.</p><p>The bank cannot safely conclude that the payment failed simply because it didn’t receive a response.</p><p>The transaction may need to remain pending while the system checks its status or awaits further information.</p><p>Once the outcome is established, the system can take the appropriate next step.</p><p>If the payment succeeded, it should be recorded accordingly.</p><p>If the payment definitively failed after the sender was debited, the applicable reversal process can restore the funds.</p><p>If the outcome remains uncertain, the system needs a safe process for investigating and resolving that uncertainty.</p><p><strong>A good payment system doesn’t confuse “I don’t know what happened” with “nothing happened.”</strong></p><h3>3. Idempotency: Don’t Process the Same Payment Twice</h3><p>Remember our earlier article about idempotency?</p><p>This is where it becomes especially important.</p><p>Imagine the customer sees an error and presses the send button again.</p><p>The first request may have succeeded, even though its response never arrived.</p><p>If the second request is treated as an entirely new payment, the customer could be charged twice.</p><p>Idempotency helps prevent this.</p><p>In a typical API implementation, the client supplies an idempotency key that identifies a logical payment request. The server uses that key, together with appropriate request validation and persistent transaction records, to ensure that retrying the same operation doesn’t create another payment.</p><p>For example:</p><pre>Idempotency-Key: payment-12345</pre><p>The client submits the payment request.</p><p>The server begins processing it, but the response is lost.</p><p>The client retries using the same key.</p><p>Instead of blindly creating another payment, the server checks the existing request and follows the appropriate behavior for that transaction’s current state.</p><p>Depending on the implementation, it may return the stored result or indicate that processing is still underway.</p><p>The exact behavior depends on the API contract.</p><p>One crucial detail: idempotency keys must be handled correctly across concurrent requests, failures, and retries. Simply attaching a key to an API request doesn’t automatically guarantee safety.</p><p>Also, idempotency doesn’t solve every problem in a multi-institution payment. The sending bank and receiving wallet may be separate systems with different transaction identifiers and processing rules.</p><p>They still need reliable ways to correlate transactions and establish the final outcome.</p><p>But idempotency provides an important foundation for preventing duplicate operations.</p><h3>4. Reversals: What Happens When the Payment Really Fails?</h3><p>Let’s return to Kwame and Ama.</p><p>Kwame sends GHS 100.</p><p>His account is debited.</p><p>The receiving institution ultimately confirms that the payment did not complete.</p><p>What happens to Kwame’s money?</p><p>The appropriate recovery process must restore his funds.</p><p>Depending on the payment arrangement and failure scenario, this may involve a reversal, refund, or another defined adjustment process.</p><p>These terms can have different meanings in different payment systems, so they shouldn’t be treated as universally interchangeable.</p><p>For our example, let’s assume the transaction qualifies for a reversal.</p><p>The system records the original debit, determines that the payment failed, and processes the appropriate compensating entry to restore Kwame’s GHS 100.</p><p>The important point is that financial systems must track both the original transaction and its recovery.</p><p>A reversal shouldn’t simply erase history as if the original operation never existed.</p><p>The records need to show what happened, why the reversal occurred, and how the customer’s balance was restored.</p><p>This is particularly important in financial systems, where transaction history supports audits, investigations, customer disputes, and reconciliation.</p><p>And there’s another important consideration: the recovery operation itself can fail or have an uncertain outcome.</p><p>That means reversal processes also need reliable tracking, duplicate protection, and appropriate retry handling.</p><p>Recovering from a failed payment is itself a payment-system problem that must be handled carefully.</p><h3>5. Reconciliation: When Two Systems Disagree</h3><p>Now imagine something more complicated.</p><p>Your bank’s records show that the payment failed.</p><p>But the receiving wallet provider’s records show that Ama was credited.</p><p>Which record is correct?</p><p>Neither institution should resolve that question by simply assuming its own records tell the whole story.</p><p>They need to investigate the discrepancy.</p><p>This is where reconciliation comes in.</p><p>Reconciliation involves comparing transaction records between systems to identify transactions that match, transactions that are missing, and transactions whose outcomes disagree.</p><p>For example, the bank might have a record showing:</p><pre>Transaction: TX1001<br>Amount: GHS 100<br>Status: Pending</pre><p>The receiving institution might have:</p><pre>Transaction: TX1001<br>Amount: GHS 100<br>Status: Successful</pre><p>These records indicate a discrepancy that needs to be resolved.</p><p>The systems or operations teams can use the relevant transaction references, timestamps, processing records, and settlement information to investigate what happened.</p><p>Depending on the payment service, reconciliation may happen through automated processes, scheduled exchanges of transaction records, operational investigations, or a combination of methods.</p><p>The goal is to establish the correct outcome and ensure that the financial records and customer balances are consistent with that outcome.</p><p>Reconciliation is not merely an accounting exercise performed at the end of the day.</p><p>It’s an important part of maintaining the integrity of payment operations.</p><p><strong>Moving money is one challenge. Knowing exactly what happened to every transaction is another.</strong></p><h3>6. What Should Payment Engineers Build for?</h3><p>If you’re building a payment API, wallet, banking application, or fintech platform, these scenarios should influence your design from the beginning.</p><p>Here are five principles worth keeping in mind.</p><p><strong>1. Track every transaction.</strong></p><p>Assign appropriate identifiers and maintain enough information to investigate a payment across the systems involved. Where different institutions use different references, establish reliable correlation mechanisms.</p><p><strong>2. Design for uncertainty.</strong></p><p>A timeout should not automatically mean failure. Your system needs a way to represent unresolved outcomes and investigate them safely.</p><p><strong>3. Make retries safe.</strong></p><p>Use idempotency and the appropriate transaction-status checks to prevent duplicate financial operations. Don’t assume that every retry is a new payment.</p><p><strong>4. Build recovery into the system.</strong></p><p>Define how failed payments, reversals, and other corrective operations are tracked, retried, and confirmed. Recovery must be reliable too.</p><p><strong>5. Reconcile records.</strong></p><p>Create processes for identifying and resolving discrepancies between your records and those of the institutions you depend on.</p><p>These principles are not just technical details. They directly affect customer trust.</p><p>A customer may forgive a temporary payment failure.</p><p>But if the system cannot explain what happened to their money, restore it appropriately, or prevent duplicate charges, the problem becomes much more serious.</p><h3>7. What Should You Do as a Customer?</h3><p>You don’t need to understand payment switches, transaction states, or reconciliation to protect yourself when a transfer goes wrong.</p><p>If your account is debited but the recipient doesn’t receive the money:</p><ul><li>Check the transaction status in your banking or mobile money app.</li><li>Keep the transaction reference and any relevant confirmation messages.</li><li>Avoid repeatedly initiating fresh transfers while the original transaction’s outcome is uncertain.</li><li>Contact your bank or payment provider and explain that your account was debited but the recipient wasn’t credited.</li><li>Follow up through the provider’s official support or dispute-resolution process if the issue remains unresolved.</li></ul><p>The institution you contact first should help you understand the next steps, even if the investigation requires coordination with another provider.</p><p>You shouldn’t have to identify which internal service failed before you can report a problem.</p><p>That responsibility belongs to the organizations operating and connecting the payment systems.</p><h3>The Bigger Lesson: Reliability Is More Than Making Payments Work</h3><p>When I first started experiencing failed transfers from my bank to Telecel Cash, I assumed the problem was straightforward.</p><p>Something was wrong with the bank.</p><p>But learning about interoperability showed me a more complicated reality.</p><p>A payment can depend on multiple systems, and those systems can fail in different ways.</p><p>Sometimes the payment never reaches the receiving institution.</p><p>Sometimes the payment succeeds but the confirmation gets lost.</p><p>Sometimes the system doesn’t know the outcome immediately.</p><p>And sometimes the records need to be reconciled before the correct outcome can be established.</p><p>That’s why reliable payment systems need more than APIs that return successful responses.</p><p>They need safe retries, meaningful transaction states, recovery mechanisms, and reliable ways to establish what happened to the money.</p><p>Because in financial technology, the goal isn’t simply to process a payment when everything works perfectly.</p><p><strong>The real test is what happens when something goes wrong.</strong></p><p>Can the system identify the transaction?</p><p>Can it determine whether the money moved?</p><p>Can it prevent duplicate payments?</p><p>Can it restore funds when a transaction genuinely fails?</p><p>And can it explain the outcome to the customer?</p><p>Those are the questions that separate a payment system that merely works from one that people can trust.</p><p>And perhaps that’s the biggest lesson from this entire series:</p><p><strong>A reliable payment system isn’t one that never experiences failure. It’s one that handles failure without losing track of the money.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8a0a416ebb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Payment Failed. But Where Did It Actually Fail?]]></title>
            <link>https://ernestyoyowah.medium.com/your-payment-failed-but-where-did-it-actually-fail-b8d350836baa?source=rss-1fc63d894c7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8d350836baa</guid>
            <category><![CDATA[mobile-money]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Ernest Yoyowah]]></dc:creator>
            <pubDate>Mon, 12 Oct 2026 23:15:14 GMT</pubDate>
            <atom:updated>2026-10-12T23:15:14.749Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Following a GHS 100 transfer from your bank to a mobile money wallet — and discovering why a simple error message can hide a complicated problem.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*_32ZJYVWeLbVoOUgEvWY2w.jpeg" /></figure><p>In the previous article, I shared how I used to blame my bank whenever a transfer from my bank account to my Telecel Cash wallet failed.</p><p>But as I learned more about payment systems and interoperability, I realized that the institution displaying the error isn’t necessarily the one responsible for it.</p><p>So let’s go a little deeper.</p><p>Imagine you’re sending <strong>GHS 100 from your bank account to Ama’s Telecel Cash wallet</strong>.</p><p>You enter her number, confirm the amount, and authorize the transaction.</p><p>Your banking app starts processing.</p><p>A few seconds later:</p><p><strong>Transaction failed.</strong></p><p>What actually happened?</p><p>Did your bank fail to process the request?</p><p>Did the payment switch encounter a problem?</p><p>Was the receiving wallet unavailable?</p><p>Or did the payment succeed, but the confirmation never make it back to your bank?</p><p>To answer these questions, we need to follow the payment.</p><h3>1. The Journey Begins at Your Bank</h3><p>When you initiate the transfer, your bank doesn’t simply move money from your account to Ama’s wallet in one magical operation.</p><p>Its systems need to validate and process your request.</p><p>Depending on the implementation, they may check:</p><ul><li>Whether your account has sufficient funds.</li><li>Whether the recipient details are valid.</li><li>Whether the transaction complies with applicable limits and security controls.</li><li>Whether the request is properly authorized.</li></ul><p>If the request passes these checks, the bank can proceed with the next stage of processing.</p><p>But here’s the thing: <strong>accepting your request isn’t the same as completing your payment.</strong></p><p>Your bank might have successfully received and validated the instruction, but the transaction may still depend on other systems before Ama receives the money.</p><p>And this is where the journey becomes interesting.</p><h3>2. The Payment Has to Reach the Other Side</h3><p>Your bank and Ama’s mobile money provider operate their own systems.</p><p>They need a supported way to exchange payment instructions and process the transaction.</p><p>Depending on the service, that journey may involve a payment switch, an aggregator, a direct integration, or other intermediary infrastructure.</p><p>Think of a payment switch as a system that helps route transactions between participating institutions according to the relevant payment scheme and routing arrangements.</p><p>An aggregator, on the other hand, may provide a connection through which businesses or financial institutions access one or more payment services.</p><p>These components aren’t interchangeable, and not every payment uses both.</p><p>But they illustrate an important point: the payment may depend on systems that neither you nor the receiving customer ever sees.</p><p>Now imagine that one of the services involved becomes temporarily unavailable.</p><p>Your bank may be working normally.</p><p>Ama’s wallet may be working normally.</p><p>But the connection between the relevant systems isn’t working as expected.</p><p>The payment could fail before reaching the receiving institution.</p><p>From your perspective, however, all you see is one message:</p><p><strong>Transaction failed.</strong></p><p>You have no idea which connection stopped working or which system couldn’t complete its part of the process.</p><p>And that is one reason payment failures can be difficult to diagnose.</p><h3>3. What If the Receiving Wallet Is the Problem?</h3><p>Let’s consider another possibility.</p><p>This time, your bank successfully sends the payment instruction through the relevant route.</p><p>The request reaches the receiving side.</p><p>But something goes wrong.</p><p>Perhaps a relevant wallet service is unavailable, an internal processing operation fails, or the transaction cannot be completed because of a validation or account-related issue.</p><p>The receiving system may reject the request or fail to complete processing.</p><p>The result could still be a failed transfer.</p><p>But notice the difference.</p><p>In the first scenario, the request couldn’t reach the receiving system successfully.</p><p>In this scenario, the request reached the receiving side, but the receiving side couldn’t complete the operation.</p><p>Both failures may look identical to the customer.</p><p>Technically, though, they’re very different.</p><p>For engineers, knowing the difference is essential. The first scenario calls for investigating connectivity or routing; the second calls for investigating the receiving service and its processing outcome.</p><p><strong>You can’t fix a problem reliably if you don’t know where it occurred.</strong></p><h3>4. The Most Dangerous Scenario: The Response Gets Lost</h3><p>Now let’s look at a more subtle problem.</p><p>Suppose your bank sends the payment instruction.</p><p>The receiving institution processes it successfully.</p><p>Ama’s wallet is credited with GHS 100.</p><p>But then something goes wrong with the response.</p><p>Perhaps the network connection breaks, or the confirmation doesn’t arrive before your bank’s timeout expires.</p><p>Your bank doesn’t receive the expected confirmation.</p><p>What does it know?</p><p>It knows that it sent a request.</p><p>It knows that it hasn’t received the expected response.</p><p>But it may not know whether the receiving institution completed the payment.</p><p>Meanwhile, Ama may already have her money.</p><p>Your banking app could still show a failed or pending transaction, depending on how the system handles the timeout.</p><p>This creates a difficult situation.</p><p><strong>The payment may have succeeded, even though the sending system doesn’t know that it succeeded.</strong></p><p>This is why a timeout is not necessarily proof of payment failure.</p><p>A timeout tells us that a system didn’t receive a response within the expected time. It doesn’t, by itself, establish what happened to the transaction on the other side.</p><p>For payment engineers, this distinction is critical.</p><p>For customers, it explains why a transaction can sometimes appear unsuccessful even when the underlying payment outcome is more complicated.</p><h3>5. Why Retrying Can Make Things Worse</h3><p>Imagine you see the failed message and immediately try sending the GHS 100 again.</p><p>If the first transaction never reached the receiving institution, the retry might be exactly what’s needed after the underlying problem is resolved.</p><p>But what if the first transaction actually succeeded?</p><p>You could end up sending another GHS 100.</p><p>Now Ama might receive GHS 200 instead of GHS 100.</p><p>This is one reason payment systems need carefully designed retry mechanisms and transaction tracking.</p><p>In our earlier article about idempotency, we discussed how systems can prevent the same payment request from being processed more than once.</p><p>That concept becomes especially important when a system cannot determine whether an earlier request succeeded.</p><p>A well-designed payment system should use the appropriate transaction reference, status checks, and idempotency controls to establish what happened before initiating another financial operation.</p><p>It shouldn’t blindly assume that a missing response means the payment never happened.</p><p>And if the payment ultimately failed after a debit was made, the appropriate reversal or refund process must restore the customer’s funds.</p><p>The exact handling depends on the payment service and the transaction’s actual state.</p><h3>6. So How Do Engineers Find the Actual Problem?</h3><p>If you’re a payment engineer, you can’t rely on the customer-facing error message alone.</p><p>You need evidence from the systems involved.</p><p>That may include:</p><ul><li><strong>Transaction references:</strong> Identifiers that help locate the same transaction across participating systems.</li><li><strong>Timestamps:</strong> When the request was initiated, sent, received, and processed.</li><li><strong>Logs and traces:</strong> Evidence of which operations succeeded or failed.</li><li><strong>Response codes:</strong> Information returned by downstream systems that helps explain the outcome.</li><li><strong>Service monitoring:</strong> Metrics showing timeouts, latency increases, connection failures, or unusual error rates.</li><li><strong>Reconciliation records:</strong> Data used to compare transaction outcomes across institutions and identify discrepancies.</li></ul><p>Not every institution has visibility into every other institution’s internal systems. That’s why transaction references, agreed response formats, operational escalation processes, and reconciliation arrangements matter.</p><p>The goal isn’t simply to discover which service returned an error.</p><p>It’s to establish what happened to the payment and determine what needs to happen next.</p><p>Did the transaction fail before processing?</p><p>Was it rejected by the receiving institution?</p><p>Is the outcome still uncertain?</p><p>Or did the payment succeed while the confirmation was lost?</p><p>Each situation requires a different response.</p><h3>The Real Lesson</h3><p>A payment isn’t just a request sent from one application to another.</p><p>It’s a process that may involve several systems, each with its own responsibilities, dependencies, and failure modes.</p><p>Your bank might be working while a downstream service is unavailable.</p><p>The receiving wallet might be working while the connection to it is failing.</p><p>Or the payment might have succeeded while the response telling your bank about that success never arrived.</p><p>That’s why the message on your screen doesn’t always tell the whole story.</p><p>And that’s why building reliable payment systems requires more than making APIs return successful responses.</p><p>You need to know what happened to the money, handle uncertainty safely, and recover when something goes wrong.</p><p>In the next article, we’ll look at the most important question of all:</p><p><strong>What happens when money leaves your account but never arrives at its destination?</strong></p><p>We’ll explore how payment systems use transaction states, idempotency, reversals, and reconciliation to resolve these situations without losing track of the money.</p><p>Because in payments, detecting a failure is important.</p><p>But knowing how to recover from it safely is just as important.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8d350836baa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Bank Isn’t Always the Problem: Why Mobile Money Transfers Fail]]></title>
            <link>https://ernestyoyowah.medium.com/your-bank-isnt-always-the-problem-why-mobile-money-transfers-fail-baf32c76e1f4?source=rss-1fc63d894c7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/baf32c76e1f4</guid>
            <category><![CDATA[mobile-money]]></category>
            <category><![CDATA[banking]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[bank-of-ghana]]></category>
            <category><![CDATA[fintech]]></category>
            <dc:creator><![CDATA[Ernest Yoyowah]]></dc:creator>
            <pubDate>Mon, 12 Oct 2026 23:12:31 GMT</pubDate>
            <atom:updated>2026-10-12T23:12:31.716Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Sometimes, the institution you blame isn’t the one causing the problem.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*jzLobToGOGks3YCf6TQP9Q.png" /></figure><p>For the longest time, whenever I tried sending money from my bank account to my Telecel Cash wallet and the transaction failed, I had one reaction:</p><p><strong>Ahhh, what’s wrong with this bank again?</strong></p><p>Seriously.</p><p>You open your banking app, initiate the transfer, wait for a few seconds, and then…</p><p><strong>Transaction failed.</strong></p><p>You try again. Same thing.</p><p>At this point, you’ve already concluded that your bank is the problem.</p><p>But what if it isn’t?</p><h3>The Day I Started Looking Beyond My Bank</h3><p>As I continued learning about payment systems, interoperability, and the role of GhIPSS in Ghana’s financial ecosystem, I began to understand something I hadn’t considered before.</p><p>A failed payment doesn’t automatically mean your bank is responsible.</p><p>One day, I tried transferring money from my bank account to my Telecel Cash wallet.</p><p>It failed.</p><p>I tried again.</p><p>It failed again.</p><p>So I decided to try another transaction using my MTN mobile money wallet.</p><p>That one worked.</p><p>I went back and tried sending money from my bank to Telecel Cash again.</p><p>It failed.</p><p>Interesting.</p><p>Why would one transaction work while another kept failing?</p><p>I couldn’t see what was happening behind the scenes, so I couldn’t say exactly where the problem was. But the experience made me question my original assumption.</p><p><strong>What if the problem wasn’t my bank, but one of the systems connecting my bank to Telecel Cash?</strong></p><p>That question changed how I thought about payment failures.</p><h3>A Payment Is More Than Two Institutions</h3><p>When you send money from your bank account to a mobile money wallet, it feels like a simple transaction.</p><p>You enter a number, specify an amount, confirm the payment, and expect the money to arrive.</p><p>But behind that simple experience, several systems may need to communicate.</p><p>Depending on the payment service, these could include:</p><ul><li>Your bank’s transaction processing systems.</li><li>Payment switches and interoperability infrastructure.</li><li>Payment processors or aggregators.</li><li>The receiving mobile money provider’s systems.</li><li>Network connections between the different services.</li><li>Fraud detection and other security controls.</li></ul><p>Each component has a role to play, although not every transaction passes through every component.</p><p>Think about it this way.</p><p>Your bank might be working perfectly. But if a service responsible for connecting it to the receiving institution becomes unavailable, the transaction could still fail.</p><p>Likewise, the receiving wallet might be working normally, but the payment request might never reach it.</p><p>From your perspective, all you see is a failed transaction.</p><p>You don’t necessarily see where the failure occurred.</p><p>And that’s the interesting part.</p><p><strong>The system that shows you the error isn’t necessarily the system that caused it.</strong></p><h3>So, Where Does GhIPSS Come In?</h3><p>If you’ve been learning about payments in Ghana, you’ve probably come across GhIPSS — Ghana Interbank Payment and Settlement Systems.</p><p>GhIPSS plays an important role in the country’s electronic payments infrastructure, including services that support interoperability between participating financial institutions.</p><p>But what does interoperability actually mean?</p><p>In simple terms, it means different systems can work together to exchange information and facilitate transactions.</p><p>Your bank has its own systems.</p><p>A mobile money provider has its own systems.</p><p>Other banks, fintechs, and financial service providers have theirs.</p><p>They don’t all operate on one giant application or share one database. They need ways to communicate and process transactions across institutional boundaries.</p><p>Payment infrastructure, including relevant GhIPSS services, helps make that possible.</p><p>However, it’s important to understand that <strong>not every payment follows the same route, and not every failed transaction involves GhIPSS</strong>.</p><p>The actual processing path depends on the service and how the participating institutions are connected.</p><p>A problem could occur at the sending bank, the receiving provider, an intermediary, a network connection, or another component involved in that particular transaction.</p><p>Without transaction evidence, blaming any one of them would simply be a guess.</p><h3>Why Your Other Transaction Might Work</h3><p>Remember my experience?</p><p>The bank-to-Telecel Cash transfer kept failing, but my other mobile money transaction worked.</p><p>This illustrates an important concept.</p><p>Two transactions that look similar to a customer don’t necessarily follow the same technical path.</p><p>Different payment services can rely on different integrations, intermediaries, and processing systems.</p><p>One route might be experiencing a problem while another continues to work.</p><p>That doesn’t tell us exactly which component failed, but it does show why we shouldn’t automatically assume that an entire institution or payment network is down just because one transaction fails.</p><p>Payment systems are interconnected, but their dependencies aren’t always identical.</p><p>And when something goes wrong, the location of the problem matters.</p><h3>The Lesson I Wish I’d Learned Earlier</h3><p>The next time you try transferring money from your bank to Telecel Cash and the transaction fails, you might still be tempted to blame your bank.</p><p>I understand.</p><p>But the failure could have originated somewhere else along the payment route.</p><p>It could be the sending institution, the receiving wallet provider, a payment processor, an aggregator, or a connectivity issue between systems.</p><p>It could even be a timeout, where the system doesn’t receive a response in time and cannot immediately confirm the final outcome.</p><p>The important thing is that <strong>a failed transaction message doesn’t always tell you what actually happened behind the scenes</strong>.</p><p>And if your account has been debited, don’t assume the money is lost or immediately initiate another fresh transfer. Check the transaction status and contact your provider with the transaction reference if the outcome remains unclear.</p><p>For everyday users, this helps explain why payment failures can be more complicated than they appear.</p><p>For software engineers, it raises a bigger question:</p><p>How do you build a payment system that remains reliable when the other systems it depends on become unavailable?</p><p>That’s where things get even more interesting.</p><p>In the next article, we’ll follow a payment from a bank account to a mobile money wallet and explore the different places it can fail — and why the error message you see might not tell the whole story.</p><p>Because when it comes to payments, understanding <strong>that something failed</strong> is only the beginning.</p><p>The real challenge is understanding <strong>where, why, and what happened to the money</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=baf32c76e1f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Payment Successful” — But Ama Still Hasn’t Received the Money]]></title>
            <link>https://ernestyoyowah.medium.com/payment-successful-but-ama-still-hasnt-received-the-money-1462f6c4bd41?source=rss-1fc63d894c7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1462f6c4bd41</guid>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[bank-of-ghana]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[payments]]></category>
            <dc:creator><![CDATA[Ernest Yoyowah]]></dc:creator>
            <pubDate>Wed, 07 Oct 2026 22:07:02 GMT</pubDate>
            <atom:updated>2026-10-07T22:07:37.365Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*iMBvBH9rzSACa01gMfawFQ.jpeg" /></figure><p>There is a particular kind of payment problem that almost feels impossible to explain.</p><p>Kwame sends GHS 100 to Ama.</p><p>His bank says:</p><p><strong>Payment Successful.</strong></p><p>Kwame gets the notification.</p><p>His account is debited.</p><p>His balance is updated.</p><p>Everything looks right.</p><p>So Kwame calls Ama.</p><p>“Did you get the money?”</p><p>Ama checks her phone.</p><p>Nothing.</p><p>She checks her balance.</p><p>Still nothing.</p><p>“I haven’t received it.”</p><p>Now we have a strange situation.</p><p><strong>Kwame has been debited. The payment says successful. But Ama doesn’t have the money.</strong></p><p>So what actually happened?</p><p><strong>The Problem With “Successful”</strong></p><p>As customers, we naturally interpret “<strong>Payment Successful”</strong> to mean:</p><p>&gt; The money has reached the recipient.</p><p>But that’s not necessarily what the system knows at that exact moment.</p><p>A payment can involve several systems:</p><pre>Kwame<br>↓<br>Bank A<br>↓<br>Payment System<br>↓<br>Bank B<br>↓<br>Ama</pre><p>Kwame’s bank may have successfully processed the payment request and debited his account.</p><p>That doesn’t automatically mean every system involved has completed its part.</p><p>Something could be delayed somewhere in the middle.</p><p>And that’s where things get interesting.</p><p><strong>Sometimes, You Just Wait</strong></p><p>This is probably the most frustrating part.</p><p>You wait five minutes.</p><p>Then ten.</p><p>Then thirty.</p><p>You ask Ama again.</p><p>Still nothing.</p><p>And then, suddenly:</p><p><strong>“I’ve received it.”</strong></p><p>You didn’t do anything.</p><p>You didn’t send the money again.</p><p>Ama didn’t do anything either.</p><p>The money simply appeared.</p><p>From the customer’s perspective, it feels like the payment was stuck somewhere and eventually found its way through.</p><p>And sometimes that’s exactly what makes payment infrastructure so difficult to reason about.</p><p>The customer sees one transaction.</p><p>Behind the scenes, multiple systems may be processing information, exchanging messages, updating records, and waiting for confirmations.</p><p><strong>But Sometimes You Have to Call the Bank</strong></p><p>Now imagine it doesn’t resolve itself.</p><p>Kwame has been debited.</p><p>Ama still hasn’t received the money.</p><p>So Kwame calls the bank.</p><p>The first thing the bank needs is usually the transaction information.</p><p>Amount.</p><p>Date.</p><p>Recipient.</p><p>Transaction reference.</p><p>Why?</p><p>Because the bank needs to trace what happened.</p><p>Was the payment created?</p><p>Was Kwame debited?</p><p>Was the payment sent to the next system?</p><p>Was it received?</p><p>Was Ama credited?</p><p>Was it reversed?</p><p>Or is it still somewhere in between?</p><p>This is why transaction references are so important in payment systems.</p><p>A payment isn’t just:</p><p>&gt; “Kwame sent Ama GHS 100.”</p><p>It needs an identity that allows different systems to refer to the same transaction.</p><p>For example:</p><pre>PAY_12345<br>GHS 100<br>Kwame → Ama</pre><p>Now engineers and operations teams can start following the transaction across the different systems involved.</p><p><strong>The Interesting Part</strong></p><p>Here’s the part I find fascinating.</p><p>Imagine the records look like this:</p><pre>Bank A<br>PAY_12345 → DEBITED<br><br>Payment System<br>PAY_12345 → PROCESSED<br><br>Bank B<br>PAY_12345 → RECEIVED<br><br>Ama&#39;s Account<br>PAY_12345 → NOT CREDITED</pre><p>Now ask:</p><p><strong>Did the payment succeed?</strong></p><p>The answer isn’t as simple as yes or no.</p><p>It succeeded somewhere.</p><p>It may have been processed somewhere else.</p><p>But the outcome the customer actually cares about hasn’t happened yet.</p><p>Ama still doesn’t have her GHS 100.</p><p>This is one of the reasons payment systems are much more complicated than they appear from a banking app.</p><p><strong>The Customer Sees a Button</strong></p><p>The customer sees:</p><p>&gt; Send GHS 100</p><p>Then:</p><p>&gt; Payment Successful</p><p>That’s it.</p><p>A payment engineer sees something very different.</p><p>They see:</p><pre>Request<br>↓<br>Authorization<br>↓<br>Debit<br>↓<br>Message<br>↓<br>Processing<br>↓<br>Receiving Institution<br>↓<br>Credit<br>↓<br>Confirmation</pre><p>And somewhere along that journey, things can become delayed, duplicated, rejected, or uncertain.</p><p>That’s why payment systems need things like transaction IDs, retries, idempotency, reversals, and reconciliation.</p><p>Because when something goes wrong, the system needs to answer a very simple question:</p><p>&gt; <strong>What actually happened to this payment?</strong></p><p><strong>The Dangerous Part: Trying Again</strong></p><p>This is where it gets even more interesting.</p><p>Imagine Kwame sends GHS 100.</p><p>His bank debits him.</p><p>But the response times out.</p><p>Kwame doesn’t know whether the payment went through.</p><p>So he tries again.</p><p>Now imagine the first payment actually succeeded.</p><p>Ama could receive:</p><p><strong>GHS 100</strong></p><p>and then another:</p><p><strong>GHS 100</strong></p><p>Kwame intended to send GHS 100.</p><p>But Ama received GHS 200.</p><p>This is why payment systems cannot simply retry every failed-looking transaction.</p><p>A timeout doesn’t always mean the payment failed.</p><p>Sometimes it means:</p><p>&gt; <strong>We don’t know what happened yet.</strong></p><p>And that is a very different state.</p><p><strong>A Principle Worth Remembering</strong></p><p>This gives us an important principle:</p><p>&gt; <strong>A successful response from one part of a payment system doesn’t necessarily mean the entire payment journey is complete.</strong></p><p>Kwame doesn’t care that his bank successfully created a transaction.</p><p>He cares that Ama received GHS 100.</p><p>That’s the real outcome.</p><p>And when those two things don’t match, the system has to figure out why.</p><p><strong>Zooming Out</strong></p><p>Let’s go back to Kwame and Ama.</p><p>Kwame sends GHS 100.</p><p>His bank says:</p><p><strong>Payment Successful.</strong></p><p>Kwame is debited.</p><p>Ama checks her phone.</p><p>Nothing.</p><p>Eventually, the money arrives.</p><p>Or Kwame calls the bank.</p><p>Or the transaction gets reversed.</p><p>Or someone has to investigate it.</p><p>To the customer, it feels like:</p><p>&gt; “I sent the money. Where is it?”</p><p>But behind that question is a much bigger one:</p><p>&gt; <strong>At what point did the systems stop agreeing about what happened?</strong></p><p>That’s the real problem.</p><p>And it’s one of the reasons payment infrastructure is so interesting.</p><p>When everything works, you don’t notice any of it.</p><p>Kwame sends GHS 100.</p><p>Ama receives GHS 100.</p><p>Everyone moves on.</p><p>But when something breaks, the invisible machinery suddenly becomes visible.</p><p>You start thinking about banks, switches, transaction records, confirmations, retries, reversals, and reconciliation.</p><p>The best infrastructure is often the infrastructure you never notice.</p><p>Until it doesn’t work.</p><p>And then you suddenly realize just how much had to happen for one little message to say:</p><p><strong>Payment Successful.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1462f6c4bd41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Net Settlement vs Gross Settlement: How Banks Settle Payments]]></title>
            <link>https://ernestyoyowah.medium.com/net-settlement-vs-gross-settlement-how-banks-settle-payments-235fa241aa0b?source=rss-1fc63d894c7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/235fa241aa0b</guid>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[bank-of-ghana]]></category>
            <category><![CDATA[banking]]></category>
            <category><![CDATA[payments]]></category>
            <dc:creator><![CDATA[Ernest Yoyowah]]></dc:creator>
            <pubDate>Thu, 10 Sep 2026 23:15:39 GMT</pubDate>
            <atom:updated>2026-09-10T23:15:39.573Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dB3-rWHRj8H7bZPDCqQxiQ.jpeg" /></figure><blockquote><em>“A payment can happen now, while the institutions involved settle their obligations later.”</em></blockquote><p>In the previous post, we learned that <strong>clearing</strong> helps determine the obligations created by payments.</p><p>Kwame sends GHS 100 to Ama.</p><p>Kwame banks with Bank A.</p><p>Ama banks with Bank B.</p><p>From Kwame’s perspective, the payment is simple.</p><p>He sends GHS 100.</p><p>Ama receives GHS 100.</p><p>But behind the scenes, Bank A and Bank B now have an obligation between them.</p><p>And Kwame’s payment is not the only one.</p><p>Thousands of other customers may also be sending money between Bank A and Bank B.</p><p>So we arrive at an important question:</p><p><strong>How should those obligations be settled?</strong></p><p>Do we settle every transaction individually?</p><p>Or do we wait, calculate what each bank owes the other, and settle only the difference?</p><p>This is where <strong>gross settlement</strong> and <strong>net settlement</strong> come in.</p><h3>Let’s Go Back to Kwame and Ama</h3><p>Suppose during the day, Bank A’s customers send:</p><ul><li>GHS 100</li><li>GHS 200</li><li>GHS 300</li><li>GHS 400</li></ul><p>That’s <strong>GHS 1,000</strong> going from Bank A to Bank B.</p><p>But Bank B’s customers are also sending money to Bank A.</p><p>Suppose they send:</p><ul><li>GHS 150</li><li>GHS 100</li><li>GHS 250</li></ul><p>That’s <strong>GHS 500</strong> going from Bank B to Bank A.</p><p>So we now have:</p><p><strong>Bank A owes Bank B: GHS 1,000</strong></p><p><strong>Bank B owes Bank A: GHS 500</strong></p><p>What happens next?</p><p>There are different ways these obligations can be settled.</p><h3>Gross Settlement</h3><p>With <strong>gross settlement</strong>, transactions are settled individually rather than being offset against each other.</p><p>For example:</p><pre>Bank A → Bank B<br>GHS 100</pre><pre>Bank A → Bank B<br>GHS 200</pre><pre>Bank A → Bank B<br>GHS 300</pre><p>Each transaction is settled on its own according to the rules of the payment system.</p><p>The system does not first combine everything and subtract what Bank B owes Bank A.</p><p>That is the idea behind <strong>gross settlement</strong>:</p><blockquote><strong><em>Transactions are settled individually rather than after netting them against other transactions.</em></strong></blockquote><p>But gross settlement tells us <strong>how</strong> settlement happens.</p><p>We still need to ask:</p><p><strong>When does settlement happen?</strong></p><h3>Real-Time Gross Settlement</h3><p>This is where we get:</p><p><strong>Real-Time Gross Settlement (RTGS).</strong></p><p>RTGS combines two ideas:</p><p><strong>Real-time</strong> — settlement takes place continuously during the system’s operating period rather than waiting for a later settlement cycle.</p><p><strong>Gross</strong> — transactions are settled individually rather than being netted together.</p><p>So:</p><blockquote><strong><em>RTGS = Real-Time + Gross Settlement.</em></strong></blockquote><p>For example, Bank A sends an eligible GHS 100 payment to Bank B.</p><p>If the payment meets the system’s requirements and the necessary liquidity is available, it can be settled individually without waiting for other transactions to offset it.</p><p>RTGS is particularly important for payment systems where the timing and finality of settlement matter.</p><p>But there is a trade-off.</p><p>Because transactions are settled individually, participating institutions need sufficient liquidity to meet their obligations.</p><h3>Net Settlement</h3><p>Now let’s look at the other approach.</p><p>Instead of settling every obligation individually, the system can accumulate transactions and calculate the <strong>net position</strong>.</p><p>Remember:</p><p>Bank A owes Bank B:</p><p><strong>GHS 1,000</strong></p><p>Bank B owes Bank A:</p><p><strong>GHS 500</strong></p><p>Instead of settling both amounts separately, the obligations can be offset:</p><p><strong>GHS 1,000 − GHS 500 = GHS 500</strong></p><p>So Bank A has a net obligation of:</p><p><strong>GHS 500 to Bank B.</strong></p><p>That’s the basic idea of <strong>net settlement</strong>.</p><blockquote><strong><em>Net settlement means offsetting obligations and settling the resulting net position.</em></strong></blockquote><p>This can significantly reduce the amount of liquidity required for settlement.</p><p>But there is another important concept:</p><p><strong>When is that net position settled?</strong></p><h3>Deferred Net Settlement</h3><p>In a <strong>Deferred Net Settlement (DNS)</strong> system, transactions can accumulate during a period before the resulting net obligations are settled.</p><p>The system may process payment instructions throughout the day, while the actual interbank settlement happens later at predefined settlement times.</p><p>For example:</p><pre>Payments accumulate<br>        ↓<br>Net obligations calculated<br>        ↓<br>Net positions settled</pre><p>This may happen once or multiple times during the day, depending on the payment system.</p><p>This is why net settlement is often associated with <strong>batch settlement</strong>.</p><p>And this gives us an important distinction:</p><p><strong>The payment can be processed now, while the interbank settlement happens later.</strong></p><h3>So Can Ama Receive the Money Before Settlement?</h3><p>Yes, depending on the payment system and its rules.</p><p>Kwame sends GHS 100.</p><p>Ama sees:</p><p><strong>GHS 100 received.</strong></p><p>But Bank B may not yet have completed its final settlement with Bank A.</p><p>The customer-facing payment and the interbank settlement are separate layers.</p><p>This is one of the reasons payment engineers need to be careful when using words like <strong>completed</strong>, <strong>settled</strong>, and <strong>final</strong>.</p><p>They can represent different stages of the payment lifecycle.</p><h3>Gross vs Net — The Easy Way to Remember It</h3><p>The easiest way to remember the difference is:</p><p><strong>Gross = settle individually.</strong></p><p><strong>Net = offset and settle the difference.</strong></p><p>Then we add another dimension:</p><p><strong>Real-time = settlement happens continuously during the operating period.</strong></p><p><strong>Deferred = settlement happens later at predefined times.</strong></p><p>So two important models are:</p><h3>Real-Time Gross Settlement (RTGS)</h3><p>Transactions are settled individually and in real time.</p><h3>Deferred Net Settlement (DNS)</h3><p>Transactions are accumulated, obligations are netted, and the resulting positions are settled later at predefined times.</p><p>This distinction is important because <strong>gross vs net tells us how settlement happens, while real-time vs deferred tells us when it happens.</strong></p><h3>Why Does This Matter?</h3><p>Let’s return to our example.</p><p>Bank A owes Bank B GHS 10 million.</p><p>Bank B owes Bank A GHS 9 million.</p><p>With net settlement:</p><p><strong>GHS 10 million − GHS 9 million = GHS 1 million</strong></p><p>Only the net obligation needs to be settled.</p><p>That can make the system more <strong>liquidity efficient</strong>.</p><p>But the delay before settlement can introduce additional <strong>settlement risk</strong>.</p><p>With gross settlement, transactions are settled individually, which can provide faster settlement and reduce certain risks associated with waiting for a later netting cycle.</p><p>But participants may need more liquidity because obligations aren’t first offset.</p><p>So payment systems are constantly balancing:</p><p><strong>Liquidity</strong></p><p><strong>Risk</strong></p><p><strong>Speed</strong></p><p><strong>Finality</strong></p><p>The choice depends on what the payment system is designed to achieve.</p><h3>The Software Engineer’s Perspective</h3><p>This matters because a payment engineer shouldn’t think of a payment as simply:</p><pre>Customer sends money<br>        ↓<br>Balance changes<br>        ↓<br>Done</pre><p>There can be several layers:</p><pre>Payment<br>   ↓<br>Clearing<br>   ↓<br>Participant obligations<br>   ↓<br>Settlement<br>   ↓<br>Reconciliation</pre><p>And the settlement layer may use different mechanisms.</p><p><strong>RTGS</strong> may settle individual transactions in real time.</p><p><strong>DNS</strong> may accumulate transactions, calculate net positions, and settle them later.</p><p>So when you see:</p><pre>payment_id = PAY_12345<br>status = COMPLETED</pre><p>you still need to understand what that status actually means.</p><p>Has the payment been processed?</p><p>Has it been cleared?</p><p>Has the interbank obligation been settled?</p><p>Has the settlement been reconciled?</p><p>Those are different questions.</p><h3>A Principle Worth Remembering</h3><p>We can now add another principle to our payment infrastructure series:</p><blockquote><strong><em>Gross vs net tells us how obligations are settled. Real-time vs deferred tells us when settlement occurs.</em></strong></blockquote><p><strong>RTGS</strong>:</p><p>Real-Time Gross Settlement.</p><p><strong>DNS</strong>:</p><p>Deferred Net Settlement.</p><p>One settles transactions individually.</p><p>The other accumulates obligations, nets them, and settles the resulting positions later.</p><p>Neither approach is universally better.</p><p>They make different trade-offs between liquidity, risk, timing, and finality.</p><h3>Zooming Out</h3><p>Let’s return to Kwame.</p><p>Kwame sends GHS 100 to Ama.</p><p>To Kwame:</p><p><strong>“GHS 100 sent successfully.”</strong></p><p>To Ama:</p><p><strong>“GHS 100 received.”</strong></p><p>But behind those two messages, Bank A and Bank B may have thousands of other obligations.</p><p>Clearing helps determine those obligations.</p><p>Settlement determines how those obligations are fulfilled.</p><p>And after all of this happens, we still have one big question:</p><p><strong>Do all the records agree?</strong></p><p>What does Bank A say?</p><p>What does Bank B say?</p><p>What does the clearing system say?</p><p>What does the settlement system say?</p><p>What happens if one system says GHS 100 while another says GHS 0?</p><p>That’s where we go next.</p><h3>Final Thoughts</h3><p>Payment systems don’t simply move money.</p><p>They also manage obligations between financial institutions.</p><p><strong>Gross settlement</strong> settles transactions individually.</p><p><strong>Net settlement</strong> offsets obligations and settles the resulting difference.</p><p><strong>RTGS</strong> combines real-time settlement with gross settlement.</p><p><strong>DNS</strong> combines deferred settlement with net settlement.</p><p>Understanding these concepts gives us a better picture of what happens after a customer taps <strong>Send</strong>.</p><p>Kwame sees:</p><p><strong>“GHS 100 sent successfully.”</strong></p><p>The payment engineer sees:</p><p><strong>A transaction that created an obligation, passed through clearing, required settlement, and will eventually need to be reconciled.</strong></p><p>And that brings us to the next question:</p><p><strong>What happens when the records don’t agree?</strong></p><p>In the next post, we’ll explore Reconciliation in Payment Systems — how financial institutions compare records across systems, identify missing, duplicate, or mismatched transactions, and make sure the numbers agree.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=235fa241aa0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clearing: How Banks Decide Who Owes What]]></title>
            <link>https://ernestyoyowah.medium.com/clearing-how-banks-decide-who-owes-what-b3480911b7fb?source=rss-1fc63d894c7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3480911b7fb</guid>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Ernest Yoyowah]]></dc:creator>
            <pubDate>Sun, 09 Aug 2026 14:41:13 GMT</pubDate>
            <atom:updated>2026-08-09T14:41:13.004Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xWqBhrP6qmGhGtXLAGpTiQ.png" /></figure><p><em>“A payment can be completed long before the financial institutions involved have finished figuring out what they owe each other.”</em></p><p>In the previous post, we learned that a <strong>completed payment doesn’t always mean the money has settled</strong>.</p><p>Kwame sends GHS 100 to Ama.</p><p>Kwame sees the payment as successful.</p><p>Ama sees the money arrive.</p><p>But behind the scenes, the financial institutions involved may still have obligations to settle.</p><p>That raises an important question.</p><p><strong>How do they know exactly who owes whom?</strong></p><p>For many software engineers, this part is easy to overlook.</p><p>The payment happened.</p><p>The customer was debited.</p><p>The recipient was credited.</p><p>So surely the banks already know what happened.</p><p>They do.</p><p>But knowing <strong>what happened to one transaction</strong> is not the same as determining <strong>what every institution owes every other institution across thousands or millions of transactions.</strong></p><p>That’s where <strong>clearing</strong> comes in.</p><h3>Let’s Go Back to Kwame and Ama</h3><p>Kwame wants to send <strong>GHS 100</strong> to Ama.</p><p>Kwame banks with <strong>Bank A</strong>.</p><p>Ama banks with <strong>Bank B</strong>.</p><p>Kwame opens his banking app.</p><p>He enters:</p><pre>Amount: GHS 100<br>Recipient: Ama</pre><p>He enters his PIN.</p><p>He taps <strong>Send</strong>.</p><p>A few seconds later:</p><p><strong>Payment Successful.</strong></p><p>From Kwame’s perspective, the transaction is done.</p><p>Bank A knows it processed a payment.</p><p>Bank B knows Ama received the money.</p><p>But imagine that this isn’t the only transaction happening.</p><p>At the same time:</p><p>Ama sends <strong>GHS 80</strong> to Kojo.</p><p>Kojo sends <strong>GHS 50</strong> to another customer.</p><p>Another customer sends <strong>GHS 200</strong> to someone at Bank A.</p><p>Another sends GHS 500.</p><p>Then another.</p><p>And another.</p><p>Suddenly, the financial system isn’t dealing with one payment.</p><p>It’s dealing with thousands of transactions between institutions.</p><p>Now the question changes.</p><p>It’s no longer:</p><blockquote><strong><em>“Did Kwame send GHS 100?”</em></strong></blockquote><p>The system already knows that.</p><p>The question becomes:</p><blockquote><strong><em>“After considering all these transactions, what does Bank A owe Bank B, and what does Bank B owe Bank A?”</em></strong></blockquote><p>That’s a much bigger problem.</p><h3>Looking Behind the Curtain</h3><p>Let’s simplify the situation.</p><p>Suppose during a period of time:</p><p>Bank A’s customers send <strong>GHS 10,000</strong> to customers at Bank B.</p><p>At the same time, Bank B’s customers send <strong>GHS 7,000</strong> to customers at Bank A.</p><p>Now there are two sets of obligations.</p><p>Bank A owes Bank B:</p><p><strong>GHS 10,000</strong></p><p>Bank B owes Bank A:</p><p><strong>GHS 7,000</strong></p><p>The payment system needs to process these transactions and determine the obligations created between the participating institutions.</p><p>That’s part of what <strong>clearing</strong> is about.</p><p>It takes the individual payment transactions and helps establish the financial obligations resulting from them.</p><h3>So What Exactly Is Clearing?</h3><p>At a high level, <strong>clearing is the process of processing payment information and determining the obligations between participants that arise from those payments.</strong></p><p>In simpler terms:</p><blockquote><strong><em>Clearing figures out who owes whom, and how much.</em></strong></blockquote><p>The exact mechanics depend on the payment system.</p><p>Some systems exchange detailed transaction information.</p><p>Some validate and process payment messages.</p><p>Some calculate obligations between participants.</p><p>Some may net those obligations.</p><p>The implementation varies.</p><p>But the underlying idea is the same:</p><p><strong>Before institutions can settle their obligations, the system needs to know what those obligations are.</strong></p><p>That’s the key distinction.</p><h3>Payment vs Clearing</h3><p>This is another place where two concepts can easily get mixed together.</p><p>A <strong>payment</strong> is about a transaction between parties.</p><p>Kwame sends GHS 100 to Ama.</p><p><strong>Clearing</strong> is about processing the resulting payment information and determining the obligations between the institutions involved.</p><p>Think of it this way:</p><p><strong>Payment asks:</strong></p><blockquote><em>Did Kwame send GHS 100 to Ama?</em></blockquote><p><strong>Clearing asks:</strong></p><blockquote><em>What obligations did all these payments create between the participating institutions?</em></blockquote><p>Those questions are related.</p><p>But they aren’t the same question.</p><h3>An Everyday Analogy</h3><p>Imagine four friends going on a trip together.</p><p>Throughout the weekend, they keep paying for things.</p><p>Kwame pays for dinner.</p><p>Ama pays for the hotel.</p><p>Kojo pays for fuel.</p><p>Akosua pays for tickets.</p><p>Nobody wants to transfer money to everyone after every purchase.</p><p>So at the end, they gather all the receipts.</p><p>They write down:</p><ul><li>Who paid.</li><li>How much they paid.</li><li>Who benefited.</li><li>Who owes whom.</li></ul><p>After looking at everything, they can determine the obligations between the four friends.</p><p>That’s similar to the problem clearing helps solve.</p><p>The individual purchases are the transactions.</p><p>The collection and calculation of the resulting obligations is the clearing process.</p><p>The actual exchange of money comes afterward.</p><h3>Why Can’t We Just Settle Every Payment Immediately?</h3><p>You might be thinking:</p><p><strong>Why not just move the money immediately?</strong></p><p>Kwame sends GHS 100.</p><p>Bank A sends GHS 100 to Bank B.</p><p>Done.</p><p>Then another customer sends GHS 50.</p><p>Move GHS 50.</p><p>Then another sends GHS 200.</p><p>Move GHS 200.</p><p>Simple.</p><p>Except the financial system may be processing millions of transactions.</p><p>Now imagine every single transaction requiring separate inter-institution settlement activity.</p><p>That creates unnecessary movement, processing, liquidity requirements, and operational complexity.</p><p>Instead, payment systems can process the transactions and determine the obligations that need to be settled.</p><p>That separation gives the system much more flexibility.</p><h3>A Bigger Example</h3><p>Let’s make Kwame and Ama’s world slightly larger.</p><p>During the day:</p><p><strong>Kwame → Ama</strong></p><p>GHS 100</p><p><strong>Ama → Kojo</strong></p><p>GHS 80</p><p><strong>Kojo → Akosua</strong></p><p>GHS 50</p><p><strong>Akosua → Kwame</strong></p><p>GHS 30</p><p>Now imagine each person uses a different financial institution.</p><p>The payment system has to keep track of all these transactions.</p><p>It needs to know:</p><ul><li>Which institution sent the payment?</li><li>Which institution received it?</li><li>How much was transferred?</li><li>Which participant owes money?</li><li>Which participant is entitled to receive money?</li><li>Which transactions belong together?</li><li>What obligations exist between participants?</li></ul><p>That’s the kind of problem clearing addresses.</p><h3>Clearing Is Not the Same as Moving Money</h3><p>This distinction is particularly important.</p><p>Clearing does not necessarily mean:</p><blockquote><strong><em>“The money has now moved between the banks.”</em></strong></blockquote><p>Instead, clearing is about the <strong>information and obligations generated by the payments</strong>.</p><p>Settlement is the stage where those financial obligations are actually fulfilled according to the rules of the relevant payment system.</p><p>So we now have another useful distinction:</p><p><strong>Payment</strong></p><p>A customer initiates a transaction.</p><p>↓</p><p><strong>Clearing</strong></p><p>The payment information is processed and the resulting obligations are determined.</p><p>↓</p><p><strong>Settlement</strong></p><p>Those obligations are fulfilled between participating institutions.</p><p>The exact sequence and timing can vary depending on the payment rail.</p><p>But as a mental model, this helps explain what’s happening behind the scenes.</p><h3>Why Software Engineers Should Care</h3><p>This matters because software engineers often model payment systems as though there is one transaction and one balance.</p><p>Real payment infrastructure is rarely that simple.</p><p>A single customer payment can create records across multiple systems.</p><p>For example:</p><pre>Customer<br>   ↓<br>Payment Application<br>   ↓<br>Payment Processor<br>   ↓<br>Bank / Financial Institution<br>   ↓<br>Clearing System<br>   ↓<br>Settlement System</pre><p>Each system may have its own responsibilities.</p><p>And each system may maintain its own records.</p><p>That means the successful response from one system doesn’t automatically tell you everything that has happened across the entire payment ecosystem.</p><p>This is why payment engineers care about:</p><ul><li>Transaction identifiers</li><li>Payment states</li><li>Clearing files or messages</li><li>Settlement records</li><li>Cut-off times</li><li>Processing windows</li><li>Exceptions</li><li>Failed transactions</li><li>Duplicate transactions</li><li>Reversals</li><li>Missing transactions</li></ul><p>The payment itself is only one part of the story.</p><h3>The Importance of Transaction Records</h3><p>Let’s say Kwame’s payment has this identifier:</p><pre>payment_id = PAY_12345</pre><p>The payment application records:</p><pre>PAY_12345<br>GHS 100<br>Kwame → Ama<br>COMPLETED</pre><p>The institution processing the transaction may have its own record.</p><p>The clearing system may have another representation.</p><p>The settlement system may eventually record the corresponding financial movement.</p><p>These systems need a reliable way to connect their records.</p><p>That is why identifiers matter so much in payment infrastructure.</p><p>When something goes wrong, engineers need to be able to answer:</p><blockquote><strong><em>Which payment does this record belong to?</em></strong></blockquote><p>Without reliable identifiers and traceability, debugging financial systems becomes extremely difficult.</p><h3>What Happens When the Numbers Don’t Match?</h3><p>Now imagine something goes wrong.</p><p>Kwame’s app says:</p><pre>GHS 100<br>COMPLETED</pre><p>Bank A says:</p><pre>GHS 100<br>Processed</pre><p>But the clearing records show:</p><pre>GHS 0</pre><p>Or the transaction is missing entirely.</p><p>Now we have a problem.</p><p>Which system is correct?</p><p>Was the payment processed?</p><p>Was it included in clearing?</p><p>Was the obligation calculated?</p><p>Was it settled?</p><p>Did something fail between the systems?</p><p>This is why payment systems cannot simply assume:</p><blockquote><strong><em>“Our database says it succeeded, so everything must be fine.”</em></strong></blockquote><p>Multiple systems have to exchange information and eventually agree on what happened.</p><p>And that brings us to an important concept we’ll explore later:</p><p><strong>Reconciliation.</strong></p><p>But before we get there, we need to understand one more piece.</p><h3>A Principle Worth Remembering</h3><p>Earlier in this series, we learned:</p><blockquote><strong><em>The ledger is the source of financial truth.</em></strong></blockquote><p>Then:</p><blockquote><strong><em>The same payment request should only change the system once.</em></strong></blockquote><p>Then:</p><blockquote><strong><em>A payment should either complete entirely or not happen at all.</em></strong></blockquote><p>Then:</p><blockquote><strong><em>An accepted payment request is not the same as a completed payment.</em></strong></blockquote><p>Then:</p><blockquote><strong><em>A completed payment is not always a settled payment.</em></strong></blockquote><p>Now we can add another principle:</p><blockquote><strong><em>Before financial institutions can settle their obligations, they need to determine what those obligations are.</em></strong></blockquote><p>That’s the role clearing helps solve.</p><p>Payment tells us what transactions occurred.</p><p>Clearing helps determine the resulting obligations.</p><p>Settlement fulfills those obligations.</p><p>And reconciliation checks that the records agree.</p><p>We’re starting to see the bigger picture.</p><h3>Zooming Out</h3><p>Let’s return to Kwame and Ama.</p><p>Kwame taps <strong>Send</strong>.</p><p>GHS 100 moves from Kwame’s account toward Ama.</p><p>To them, it feels like one simple event.</p><p>But behind that transaction, the system has to answer increasingly larger questions.</p><p>First:</p><blockquote><strong><em>Did Kwame initiate the payment?</em></strong></blockquote><p>Then:</p><blockquote><strong><em>Was the payment processed successfully?</em></strong></blockquote><p>Then:</p><blockquote><strong><em>What obligations did this payment create between the institutions involved?</em></strong></blockquote><p>Then:</p><blockquote><strong><em>How should those obligations be settled?</em></strong></blockquote><p>And eventually:</p><blockquote><strong><em>Do everyone’s records agree?</em></strong></blockquote><p>Each question represents another layer of the payment system.</p><p>That’s what makes payment infrastructure so interesting.</p><p>A customer sees:</p><p><strong>“GHS 100 sent successfully.”</strong></p><p>A payment engineer sees an entire chain of systems behind those words.</p><h3>Final Thoughts</h3><p>When Kwame sends GHS 100 to Ama, it feels like one movement of money.</p><p>But financial infrastructure has to process much more than that single transaction.</p><p>It has to capture what happened.</p><p>It has to communicate that information between participants.</p><p>It has to determine the obligations created by those transactions.</p><p>And eventually, those obligations have to be settled.</p><p>That’s why understanding clearing matters.</p><p>It helps us see that payment systems aren’t simply moving money from one account to another.</p><p>They’re also <strong>processing information, creating obligations, and coordinating multiple financial institutions.</strong></p><p>And once the system knows who owes whom, we arrive at the next question:</p><p><strong>How should those obligations actually be settled?</strong></p><p>Do we settle every transaction individually?</p><p>Or can we offset obligations and settle only the difference?</p><p>That’s the question we’ll answer in the next post.</p><p>In the next post, we’ll explore <strong>Net Settlement vs Gross Settlement</strong> — why financial institutions don’t necessarily transfer money for every individual payment, and how payment systems can settle enormous numbers of transactions efficiently.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3480911b7fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Settlement vs Payment: Why “Payment Completed” Doesn’t Always Mean the Money Has Changed Hands]]></title>
            <link>https://ernestyoyowah.medium.com/payment-terminology-every-software-engineer-should-understand-part-8-5fe70d56845f?source=rss-1fc63d894c7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fe70d56845f</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[banking-technology]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Ernest Yoyowah]]></dc:creator>
            <pubDate>Thu, 06 Aug 2026 00:32:39 GMT</pubDate>
            <atom:updated>2026-08-09T14:47:46.325Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*Ukl9EHYH-0tXe9UNbYVUcw.jpeg" /></figure><p><em>“When customers hear ‘payment completed,’ they think the money has already arrived. Payment systems know that’s not always true.”</em></p><p>In the previous post, we learned that receiving <strong>200 OK</strong> doesn’t necessarily mean a payment has finished.</p><p>A payment may continue processing in the background before eventually reaching a final state.</p><p>But even after a payment is marked <strong>Completed</strong>, another important question remains.</p><p><strong>Has the money actually changed hands?</strong></p><p>For many software engineers, the answer seems obvious.</p><p>Of course it has.</p><p>The payment is complete.</p><p>The customer received a notification.</p><p>The merchant sees the transaction.</p><p>Surely the money has already moved.</p><p>Not necessarily.</p><p>To understand why, we need to distinguish between two terms that are often used as though they mean the same thing.</p><p><strong>Payment.</strong></p><p>And <strong>settlement.</strong></p><h3>What Is a Payment?</h3><p>Let’s go back to Kwame and Ama.</p><p>Kwame wants to send <strong>GHS 100</strong> to Ama.</p><p>He enters the amount.</p><p>He enters his PIN.</p><p>He taps <strong>Send</strong>.</p><p>A few seconds later, both phones display the same message.</p><p><strong>Payment Successful.</strong></p><p>From the customer’s perspective, that’s the end of the story.</p><p>The payment has happened.</p><p>And from the application’s perspective, that’s also true.</p><p>The payment has been authorized, processed, and completed.</p><p>But that doesn’t necessarily mean the financial institutions involved have exchanged the money yet.</p><h3>Looking Behind the Curtain</h3><p>Imagine Kwame banks with <strong>Bank A</strong>.</p><p>Ama banks with <strong>Bank B</strong>.</p><p>When Kwame sends GHS 100, Bank A immediately reduces Kwame’s balance.</p><p>Bank B increases Ama’s balance.</p><p>To both customers, the payment appears complete.</p><p>But now another question arises.</p><p>Bank B has effectively advanced GHS 100 to Ama.</p><p>When will Bank A actually transfer that GHS 100 to Bank B?</p><p>That’s settlement.</p><h3>What Is Settlement?</h3><p>Settlement is the process of financial institutions exchanging funds to fulfill the obligations created by customer payments.</p><p>In simpler terms:</p><p>A payment is an instruction to move money.</p><p>Settlement is when the institutions involved actually exchange the money.</p><p>The two often happen so closely together that customers never notice the difference.</p><p>But inside the financial system, they’re separate events.</p><h3>An Analogy</h3><p>Imagine you buy lunch with a credit card.</p><p>The restaurant immediately accepts your payment.</p><p>You receive your food.</p><p>Everyone behaves as though the payment is complete.</p><p>But the restaurant doesn’t instantly receive the money from your bank.</p><p>Instead, several organizations still have work to do.</p><p>The card network processes the transaction.</p><p>The acquiring bank calculates what it’s owed.</p><p>The issuing bank calculates what it owes.</p><p>Only later are the funds transferred between financial institutions.</p><p>You walked away with your lunch long before settlement occurred.</p><p>The payment happened first.</p><p>Settlement came later.</p><h3>Why Doesn’t Settlement Happen Instantly?</h3><p>If every bank transferred money to every other bank after every single payment, the financial system would spend all day moving tiny amounts of money back and forth.</p><p>Imagine this.</p><p>Throughout the day:</p><ul><li>Kwame sends GHS 100 to Ama.</li><li>Ama sends GHS 80 to Kojo.</li><li>Kojo sends GHS 50 to Akosua.</li><li>Thousands of customers continue making payments.</li></ul><p>Rather than transferring money after every transaction, payment systems often calculate what each institution ultimately owes the others.</p><p>Only then do they exchange the final amounts.</p><p>This makes the system far more efficient.</p><h3>Payment vs Settlement</h3><p>Although they’re closely related, they answer different questions.</p><p><strong>Payment asks:</strong></p><blockquote><em>Has the customer’s transaction been processed successfully?</em></blockquote><p><strong>Settlement asks:</strong></p><blockquote><em>Have the financial institutions exchanged the money they owe each other?</em></blockquote><p>Those answers are often “yes.”</p><p>But not always at the same time.</p><h3>A Real Example</h3><p>Suppose Kwame pays an online store GHS 500.</p><p>His bank immediately debits his account.</p><p>The merchant receives confirmation that the payment succeeded.</p><p>The merchant ships the order.</p><p>Yet the merchant’s bank may not actually receive the funds until later that day.</p><p>Or the next business day.</p><p>Or according to the settlement schedule of the payment network.</p><p>From the customer’s perspective, the payment is complete.</p><p>Behind the scenes, settlement is still underway.</p><h3>Why Software Engineers Should Care</h3><p>Understanding settlement helps you:</p><ul><li>Understand why merchants don’t always receive funds immediately.</li><li>Explain pending balances.</li><li>Design systems that distinguish between payment status and fund availability.</li><li>Better understand card payments, bank transfers, and mobile money.</li><li>Build software that reflects how financial institutions actually operate.</li></ul><p>Many payment systems expose separate statuses because payment processing and settlement are different parts of the journey.</p><p>Treating them as the same can lead to confusing business logic.</p><h3>A Principle Worth Remembering</h3><p>Earlier in this series, we learned:</p><blockquote><strong><em>The ledger is the source of financial truth.</em></strong></blockquote><p>Then we learned:</p><blockquote><strong><em>The same payment request should only change the system once.</em></strong></blockquote><p>Then we learned:</p><blockquote><strong><em>A payment should either complete entirely or not happen at all.</em></strong></blockquote><p>Then we learned:</p><blockquote><strong><em>An accepted payment request is not the same as a completed payment.</em></strong></blockquote><p>Now we can add another principle:</p><blockquote><strong><em>A completed payment is not always a settled payment.</em></strong></blockquote><p>Customers experience payments.</p><p>Financial institutions perform settlement.</p><p>They’re connected.</p><p>But they aren’t the same thing.</p><h3>Final Thoughts</h3><p>When Kwame taps <strong>Send</strong>, his goal is simple.</p><p>He wants Ama to receive GHS 100.</p><p>Once both of them see <strong>Payment Successful</strong>, they naturally assume the money has already changed hands.</p><p>Inside the financial system, however, another process is still taking place.</p><p>Banks calculate what they owe each other.</p><p>Payment networks exchange instructions.</p><p>Settlement systems transfer funds between institutions.</p><p>Customers rarely notice this invisible layer.</p><p>But it’s one of the reasons modern payment systems can process millions of transactions efficiently while maintaining trust between financial institutions.</p><p>In the next post, we’ll explore <strong>Clearing</strong> — the step between payment and settlement, where financial institutions exchange payment information and determine exactly who owes whom before any money actually moves.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fe70d56845f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Webhooks and Asynchronous Payments: Why “200 OK” Doesn’t Mean the Payment Is Finished]]></title>
            <link>https://ernestyoyowah.medium.com/payment-terminology-every-software-engineer-should-understand-part-7-d8f636294fa4?source=rss-1fc63d894c7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8f636294fa4</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[webhooks]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[finance-and-banking]]></category>
            <category><![CDATA[fintech]]></category>
            <dc:creator><![CDATA[Ernest Yoyowah]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 23:04:19 GMT</pubDate>
            <atom:updated>2026-08-09T14:46:57.561Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*45ndqgk_FKc_F_Eezw66Kg.png" /></figure><p><em>“One of the biggest misconceptions in payments is believing that a successful API response means a successful payment.”</em></p><p>Back in the first post of this series, we asked a simple question.</p><blockquote>The API returned <strong>200 OK</strong>. The payment was successful… right?</blockquote><p>By now, you already know the answer.</p><p>Not necessarily.</p><p>We’ve learned that:</p><ul><li>A payment is a journey through different states.</li><li>The ledger is the source of financial truth.</li><li>Idempotency prevents duplicate payments.</li><li>Atomicity ensures payments never complete halfway.</li></ul><p>Now it’s time to revisit that very first misconception.</p><p>Because in many payment systems, the API returns <strong>before the payment is actually finished</strong>.</p><p>Understanding why is one of the biggest mindset shifts for software engineers building payment systems.</p><h3>Synchronous vs Asynchronous</h3><p>Let’s start with two words you’ll hear often.</p><p><strong>Synchronous</strong> means the caller waits until the work is complete before receiving a response.</p><p>Imagine ordering food at a restaurant.</p><p>You place your order.</p><p>The waiter disappears into the kitchen.</p><p>You stand there waiting until your food is ready.</p><p>Only then are you allowed to leave.</p><p>That’s synchronous.</p><p>Now imagine a different restaurant.</p><p>You place your order.</p><p>The cashier gives you a receipt with order number <strong>42</strong>.</p><p>You take a seat.</p><p>A few minutes later, your number appears on the screen.</p><p>You collect your food.</p><p>That’s asynchronous.</p><p>The order wasn’t finished when you left the counter.</p><p>The work continued in the background.</p><p>Payment systems behave much more like the second example.</p><h3>Why Payments Take Time</h3><p>Suppose Kwame sends <strong>GHS 100</strong> to Ama.</p><p>The mobile app sends a request.</p><pre>POST /payments</pre><p>The payment platform immediately performs some initial checks.</p><ul><li>Is the request valid?</li><li>Has the customer authenticated?</li><li>Does the account exist?</li><li>Is the request a duplicate?</li><li>Is there enough balance?</li></ul><p>Everything looks good.</p><p>The platform responds:</p><pre>HTTP/1.1 200 OK</pre><p>Does that mean Ama has received the money?</p><p>Not yet.</p><p>The payment may still need to:</p><ul><li>Contact another bank.</li><li>Wait for a mobile money provider.</li><li>Run fraud checks.</li><li>Perform compliance screening.</li><li>Reserve funds.</li><li>Update multiple internal systems.</li><li>Wait for confirmation from an external network.</li></ul><p>Some of these steps may take seconds.</p><p>Others may take minutes.</p><p>Some cross-border payments can take even longer.</p><p>Returning a response immediately keeps the application responsive while the payment continues behind the scenes.</p><h3>What Does 200 OK Actually Mean?</h3><p>This is where many engineers get confused.</p><p>A <strong>200 OK</strong> simply means:</p><blockquote><strong><em>“I successfully received and accepted your request.”</em></strong></blockquote><p>It does <strong>not</strong> necessarily mean:</p><blockquote><strong><em>“The payment has completed.”</em></strong></blockquote><p>Think about sending a package through a courier.</p><p>The courier accepts your parcel.</p><p>They give you a receipt.</p><p>The receipt doesn’t mean the package has already been delivered.</p><p>It only confirms they’ve accepted responsibility for delivering it.</p><p>Payment APIs work the same way.</p><p>The request has been accepted.</p><p>The payment is still on its journey.</p><h3>Following the Payment Journey</h3><p>Earlier in this series, we introduced payment states.</p><p>After receiving the request, the payment might move through states like these:</p><pre>Initiated<br>      │<br>      ▼<br>Processing<br>      │<br>      ▼<br>Pending<br>      │<br>      ▼<br>Completed</pre><p>Or perhaps:</p><pre>Initiated<br>      │<br>      ▼<br>Processing<br>      │<br>      ▼<br>Failed</pre><p>The API response tells you the journey has begun.</p><p>Not where it ends.</p><h3>So How Does the Merchant Know?</h3><p>Imagine you’re running an online store.</p><p>Kwame pays for a new laptop.</p><p>Your backend calls the payment API.</p><p>It immediately receives:</p><pre>200 OK</pre><p>Should you ship the laptop?</p><p>Definitely not.</p><p>At this point, all you know is that the payment request was accepted.</p><p>You still don’t know whether the payment eventually succeeds.</p><p>Your application needs another way to learn the final outcome.</p><p>That’s where webhooks come in.</p><h3>What Is a Webhook?</h3><p>A webhook is simply a way for one system to notify another when something important happens.</p><p>Instead of constantly asking,</p><blockquote><em>“Has the payment finished yet?”</em></blockquote><p>the payment platform contacts your application when there’s something new to report.</p><p>Think of it like ordering food for delivery.</p><p>You don’t call the restaurant every minute asking,</p><p><em>“Is my food ready now?”</em></p><p>Instead, the delivery rider calls you when they’ve arrived.</p><p>The restaurant initiates the communication.</p><p>So does the payment platform.</p><h3>A Typical Flow</h3><p>The interaction often looks like this.</p><ol><li>Your application creates a payment.</li><li>The payment platform responds with <strong>200 OK</strong>.</li><li>The payment continues processing.</li><li>Eventually, the payment reaches a final state.</li><li>The payment platform sends a webhook to your server.</li></ol><p>The webhook might contain something like:</p><pre>{<br>  &quot;event&quot;: &quot;payment.completed&quot;,<br>  &quot;transactionId&quot;: &quot;TXN-847291&quot;,<br>  &quot;status&quot;: &quot;Completed&quot;<br>}</pre><p>Now your application knows the payment has actually finished.</p><p>Only then should it perform business actions like:</p><ul><li>Deliver digital goods.</li><li>Ship an order.</li><li>Upgrade a subscription.</li><li>Send a receipt.</li></ul><h3>Why Not Just Keep Asking?</h3><p>Instead of webhooks, your application could repeatedly ask:</p><pre>GET /payments/TXN-847291</pre><p>again…</p><p>and again…</p><p>and again.</p><p>This approach is called <strong>polling</strong>.</p><p>It works.</p><p>But imagine thousands of merchants checking payment statuses every few seconds.</p><p>Most of those requests would return exactly the same answer.</p><p>Nothing has changed.</p><p>Polling wastes bandwidth and computing resources.</p><p>Webhooks are more efficient.</p><p>The payment platform only sends a message when there’s actually something worth saying.</p><h3>Webhooks Are Events</h3><p>Earlier, we said a webhook notifies another system when something important happens.</p><p>In software engineering, we call those important happenings <strong>events</strong>.</p><p>Examples include:</p><ul><li>Payment initiated.</li><li>Payment completed.</li><li>Payment failed.</li><li>Refund completed.</li><li>Chargeback received.</li></ul><p>Instead of one system constantly asking questions, systems communicate by publishing events.</p><p>Other systems listen for the events they care about.</p><p>This is one of the ideas behind <strong>event-driven architecture</strong>, which is widely used in payment systems.</p><p>Rather than every service waiting for every other service, they react when events occur.</p><p>That makes large payment platforms more scalable and resilient.</p><h3>Webhooks Can Be Delivered More Than Once</h3><p>If you’ve been following this series carefully, this next point should sound familiar.</p><p>Imagine the payment platform sends a webhook saying the payment completed.</p><p>Your server receives it.</p><p>But before sending back a response…</p><p>Your server crashes.</p><p>Did your application process the webhook?</p><p>The payment platform doesn’t know.</p><p>So it retries.</p><p>Now the same webhook arrives again.</p><p>Sound familiar?</p><p>Just like payment requests, webhook deliveries can be retried.</p><p>That’s why webhook handlers should also be <strong>idempotent</strong>.</p><p>Receiving the same event twice shouldn’t ship two laptops.</p><p>Or send two receipts.</p><p>Or credit a wallet twice.</p><p>The request may happen multiple times.</p><p>The effect should happen once.</p><h3>Why Software Engineers Should Care</h3><p>Understanding asynchronous payments helps you:</p><ul><li>Build systems that don’t assume <strong>200 OK</strong> means success.</li><li>Process webhooks safely.</li><li>Design event-driven applications.</li><li>Handle long-running payment operations.</li><li>Build more reliable integrations.</li></ul><p>Many production payment bugs happen because developers treat an accepted request as a completed payment.</p><p>Understanding the difference helps you avoid those mistakes.</p><h3>A Principle Worth Remembering</h3><p>Earlier in this series, we learned:</p><blockquote><strong><em>The ledger is the source of financial truth.</em></strong></blockquote><p>Then we learned:</p><blockquote><strong><em>The same payment request should only change the system once.</em></strong></blockquote><p>Then we learned:</p><blockquote><strong><em>A payment should either complete entirely or not happen at all.</em></strong></blockquote><p>Now we can add another principle:</p><blockquote><strong><em>An accepted payment request is not the same as a completed payment.</em></strong></blockquote><p>A <strong>200 OK</strong> tells you the payment has entered the system.</p><p>The final outcome arrives later.</p><p>Often through a webhook.</p><h3>Final Thoughts</h3><p>When Kwame taps <strong>Send</strong>, his payment doesn’t instantly appear in Ama’s wallet.</p><p>Behind the scenes, multiple systems begin working together.</p><p>Banks communicate.</p><p>Fraud checks run.</p><p>Ledgers are updated.</p><p>External networks respond.</p><p>All of that takes time.</p><p>Rather than making the customer wait, payment platforms acknowledge the request quickly and continue processing in the background.</p><p>When the journey finally ends, they notify interested systems using webhooks.</p><p>That’s why experienced payment engineers don’t celebrate when they receive <strong>200 OK</strong>.</p><p>They celebrate when they receive <strong>payment.completed</strong>.</p><p>In the next post, we’ll explore <strong>Settlement</strong> vs <strong>Payment</strong> — why a completed payment doesn’t always mean the money has actually settled, and why moving money between financial institutions can take longer than customers expect.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8f636294fa4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Atomicity and Consistency: Why Payment Systems Never Move Money Halfway]]></title>
            <link>https://ernestyoyowah.medium.com/payment-terminology-every-software-engineer-should-understand-part-6-08c7e93e19f2?source=rss-1fc63d894c7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/08c7e93e19f2</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[bank-of-ghana]]></category>
            <category><![CDATA[fintech]]></category>
            <dc:creator><![CDATA[Ernest Yoyowah]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 23:07:41 GMT</pubDate>
            <atom:updated>2026-08-09T14:46:10.393Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_RqmaL_4iPw1VURzqee9eg.png" /></figure><p><em>“The worst payment isn’t one that fails. It’s the one that only half succeeds.”</em></p><p>In the previous post, we learned how idempotency prevents duplicate payments by ensuring the same payment request only changes the system once.</p><p>But that raises another important question.</p><p>What happens if a payment starts processing…</p><p>…but doesn’t finish?</p><p>Imagine Kwame wants to send <strong>GHS 100</strong> to Ama.</p><p>He enters the amount.</p><p>He enters his PIN.</p><p>He taps <strong>Send</strong>.</p><p>The payment system begins processing the transaction.</p><p>It successfully debits Kwame’s wallet.</p><p>Then, just before Ama’s wallet is credited…</p><p>The server crashes.</p><p>Now what?</p><p>Kwame has lost GHS 100.</p><p>Ama hasn’t received anything.</p><p>Has the payment succeeded?</p><p>Or has it failed?</p><p>The answer should never be:</p><p><strong>“A little bit of both.”</strong></p><p>That’s exactly what <strong>atomicity</strong> is designed to prevent.</p><h3>What Does “Atomicity” Actually Mean?</h3><p>Like many technical terms, the word sounds more intimidating than the idea behind it.</p><p>Let’s break it down.</p><p>The word <strong>atomic</strong> comes from the Greek word <em>atomos</em>, which means <strong>“indivisible.”</strong></p><p>For centuries, people believed an atom was the smallest thing that couldn’t be split.</p><p>Although modern science has shown that’s no longer true, the original idea still gives us a useful way to think about transactions.</p><p>Something atomic is treated as one indivisible unit.</p><p>Computer science borrowed that idea.</p><p>Instead of talking about particles, we talk about operations.</p><p>An operation is atomic if all of its parts succeed together.</p><p>If one part fails, none of the changes are kept.</p><p>That’s exactly what we want in payments.</p><p>A payment isn’t just one action.</p><p>It’s a collection of related actions that must either all happen together…</p><p>…or not happen at all.</p><h3>A Payment Is More Than Moving Money</h3><p>It’s easy to think of a payment as simply moving money from one account to another.</p><p>In reality, several things usually happen behind the scenes.</p><p>A typical payment might:</p><ul><li>Debit Kwame’s wallet.</li><li>Credit Ama’s wallet.</li><li>Record entries in the ledger.</li><li>Update the transaction status.</li><li>Generate an audit trail.</li><li>Notify other systems.</li></ul><p>To the customer, that’s one payment.</p><p>To the payment system, it’s several operations working together.</p><p>The challenge is making sure they behave like a single unit.</p><h3>The Half-Completed Payment</h3><p>Let’s return to our example.</p><p>The payment system starts processing Kwame’s transfer.</p><pre>Debit Kwame GHS 100</pre><p>Success.</p><p>Next comes:</p><pre>Credit Ama GHS 100</pre><p>But before that happens…</p><p>The database crashes.</p><p>The payment process stops immediately.</p><p>Now the system is left in an impossible situation.</p><p>Kwame’s balance has decreased.</p><p>Ama’s balance hasn’t increased.</p><p>The payment isn’t complete.</p><p>Yet part of it has already happened.</p><p>This is one of the most dangerous failures a payment system can experience.</p><p>Not because the payment failed.</p><p>But because it failed halfway.</p><h3>How Payment Systems Prevent Half-Completed Payments</h3><p>Instead of treating each operation independently, payment systems group them into a single transaction.</p><p>Conceptually, it looks something like this:</p><pre>Begin Transaction</pre><pre>Debit Kwame</pre><pre>Credit Ama</pre><pre>Write Ledger Entries</pre><pre>Update Payment Status</pre><pre>Commit Transaction</pre><p>Nothing is considered permanent until every step succeeds.</p><p>If everything completes successfully, the transaction is committed.</p><p>If any step fails, the entire transaction is rolled back.</p><p>It’s as though the payment never started.</p><p>Kwame keeps his GHS 100.</p><p>Ama doesn’t receive money she shouldn’t have.</p><p>The system returns to its previous state.</p><p>Money never gets stuck halfway.</p><h3>What Is a Rollback?</h3><p>A rollback simply means undoing every change made during a transaction.</p><p>Imagine editing a document on your computer.</p><p>You make several changes.</p><p>Before you click <strong>Save</strong>, your laptop suddenly loses power.</p><p>When you reopen the document, your edits are gone.</p><p>They were never permanently saved.</p><p>Payment systems work in a similar way.</p><p>Until the transaction is successfully completed, every change can still be undone.</p><p>If something goes wrong, the safest option is to discard all the changes and leave the system exactly as it was before.</p><h3>Where Does Consistency Fit In?</h3><p>Atomicity and consistency are often mentioned together because they solve related — but different — problems.</p><p>Atomicity asks:</p><blockquote><strong><em>Did every part of the transaction succeed together?</em></strong></blockquote><p>Consistency asks:</p><blockquote><strong><em>Is the system still correct after the transaction finishes?</em></strong></blockquote><p>Suppose Kwame has GHS 500.</p><p>After sending Ama GHS 100:</p><ul><li>Kwame should now have GHS 400.</li><li>Ama should receive GHS 100.</li><li>The ledger should remain balanced.</li><li>No business rules should be violated.</li></ul><p>If any of those conditions aren’t true, the transaction shouldn’t be committed.</p><p>Consistency ensures the payment system always moves from one valid state to another.</p><p>Never from a valid state to an invalid one.</p><h3>A Quick Note About ACID</h3><p>If you’ve worked with databases before, you’ve probably heard the term <strong>ACID</strong>.</p><p>It stands for:</p><ul><li><strong>Atomicity</strong></li><li><strong>Consistency</strong></li><li><strong>Isolation</strong></li><li><strong>Durability</strong></li></ul><p>These four properties help databases execute transactions safely.</p><p>For payment systems, atomicity and consistency are fundamental.</p><p>Atomicity ensures that a payment is all or nothing.</p><p>Consistency ensures that the payment leaves the system in a valid state.</p><p>We’ll explore isolation and durability later in this series, where they’ll make much more sense in the context of concurrent payments, system failures, and recovery.</p><p>For now, it’s enough to remember that ACID exists because real systems fail — and transactions need rules that keep data correct when they do.</p><h3>Why Software Engineers Should Care</h3><p>Understanding atomicity helps you:</p><ul><li>Prevent partial payments.</li><li>Protect the integrity of your ledger.</li><li>Recover safely from failures.</li><li>Design reliable transaction processing.</li><li>Build systems customers can trust.</li></ul><p>Like idempotency, it’s one of those concepts users rarely think about.</p><p>But they immediately notice when it’s missing.</p><h3>A Principle Worth Remembering</h3><p>Earlier in this series, we learned:</p><blockquote><strong><em>The ledger is the source of financial truth.</em></strong></blockquote><p>Then we learned:</p><blockquote><strong><em>The same payment request should only change the system once.</em></strong></blockquote><p>Now we can add another principle:</p><blockquote><strong><em>A payment should either complete entirely or not happen at all.</em></strong></blockquote><p>Servers can crash.</p><p>Networks can fail.</p><p>Databases can restart.</p><p>None of those failures should leave money stranded halfway through a transaction.</p><h3>Final Thoughts</h3><p>Every payment involves more than simply moving money.</p><p>Behind a single tap on <strong>Send</strong> are multiple operations working together.</p><p>Money is debited.</p><p>Money is credited.</p><p>Ledger entries are recorded.</p><p>Payment states are updated.</p><p>Other systems are notified.</p><p>If those operations aren’t treated as one indivisible transaction, failures can leave the system in an inconsistent state.</p><p>Atomicity prevents that.</p><p>It ensures that either every step succeeds…</p><p>…or every step is undone.</p><p>That’s one of the reasons modern payment systems remain trustworthy, even when unexpected failures occur.</p><p>In the next post, we’ll explore <strong>Webhooks and Asynchronous Payments</strong> — why receiving a <strong>200 OK</strong> from a payment API doesn’t always mean the payment is actually finished.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=08c7e93e19f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Idempotency: Why You Don’t Get Charged Twice]]></title>
            <link>https://ernestyoyowah.medium.com/payment-terminology-every-software-engineer-should-understand-part-5-616a646ac9e8?source=rss-1fc63d894c7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/616a646ac9e8</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[bank-of-ghana]]></category>
            <dc:creator><![CDATA[Ernest Yoyowah]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 22:46:21 GMT</pubDate>
            <atom:updated>2026-08-09T14:44:29.555Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a5D2I9O9VifKJVwBTenh3g.png" /></figure><p><em>“The most dangerous payment isn’t the one that fails. It’s the one that’s processed twice.”</em></p><p>In the previous post, we learned that every payment moves through a lifecycle — from <strong>Initiated</strong> to <strong>Completed</strong>.</p><p>But here’s a question every payment system eventually has to answer.</p><p><strong>What happens if the same payment request arrives twice?</strong></p><p>Should the system process it twice?</p><p>Or should it recognize that it’s the same request?</p><p>That’s exactly what <strong>idempotency</strong> is designed to solve.</p><p>If you’re building payment systems, it’s one of the most important concepts you’ll learn.</p><h3>What Does “Idempotency” Actually Mean?</h3><p>The word <strong>idempotency</strong> sounds complicated, but the idea behind it is surprisingly simple.</p><p>Let’s break it down.</p><p>The word comes from Latin.</p><ul><li><strong>idem</strong> means <strong>“the same.”</strong></li><li><strong>potent</strong> comes from the Latin word <em>potens</em>, meaning <strong>“power”</strong> or <strong>“effect.”</strong></li></ul><p>You may have heard the word <strong>impotent</strong> used to describe someone who lacks power or ability.</p><p>It comes from the same Latin root.</p><p>The prefix <strong>im-</strong> means <strong>“not.”</strong></p><p>So <strong>impotent</strong> literally means <strong>“not powerful.”</strong></p><p>Similarly, <strong>idempotent</strong> combines:</p><ul><li><strong>idem</strong> — the same</li><li><strong>potent</strong> — effect</li></ul><p>In mathematics, an operation is called <strong>idempotent</strong> if performing it multiple times has the same effect as performing it once.</p><p>Computer science borrowed that idea.</p><p>Instead of talking about numbers, we talk about operations.</p><p>An operation is idempotent if repeating it doesn’t create additional effects after the first successful execution.</p><p>That’s exactly what we want in payments.</p><p>The request may be repeated.</p><p>The effect should remain the same.</p><h3>A Common Scenario</h3><p>Imagine Kwame wants to send <strong>GHS 100</strong> to Ama.</p><p>He enters the amount.</p><p>He enters his PIN.</p><p>He taps <strong>Send</strong>.</p><p>The app starts loading.</p><p>Five seconds pass.</p><p>No confirmation.</p><p>Kwame isn’t sure whether the payment went through.</p><p>So he taps <strong>Send</strong> again.</p><p>Now the payment platform has received two identical requests.</p><p>What should happen?</p><h3>The Wrong Outcome</h3><p>If the payment system processes both requests independently, the result looks like this:</p><pre>Request 1<br><br>Debit Kwame GHS 100<br>Credit Ama GHS 100<br>Completed</pre><pre>Request 2<br><br>Debit Kwame GHS 100<br>Credit Ama GHS 100<br>Completed</pre><p>Kwame has now sent <strong>GHS 200</strong>.</p><p>Ama has received <strong>GHS 200</strong>.</p><p>Neither of them intended that.</p><p>The customer is frustrated.</p><p>Support receives a complaint.</p><p>An engineer starts investigating logs.</p><p>The duplicate payment wasn’t caused by a bug in the business logic.</p><p>It happened because the system couldn’t recognize that both requests represented the same payment.</p><h3>Why Duplicate Requests Happen</h3><p>Many engineers assume duplicate requests are rare.</p><p>They’re not.</p><p>They happen every day.</p><p>For example:</p><ul><li>The customer taps <strong>Send</strong> twice.</li><li>The mobile app retries after a timeout.</li><li>The network drops before the response reaches the client.</li><li>An API gateway retries the request.</li><li>One service retries another service.</li></ul><p>Notice something important.</p><p>Most duplicate requests aren’t caused by users making mistakes.</p><p>They’re caused by uncertainty.</p><p>The client simply doesn’t know whether the first request succeeded.</p><p>Retrying is often the correct thing to do.</p><p>The payment system must be designed to handle that safely.</p><h3>How Payment Systems Prevent Duplicate Payments</h3><p>When a client sends a payment request, it also sends a unique identifier called an <strong>idempotency key</strong>.</p><p>A request might look like this:</p><pre>POST /payments</pre><pre>Idempotency-Key: 8f73d9a4-21d6-4e78-9f1c-4b84b8e9b731</pre><pre>{<br>  &quot;sender&quot;: &quot;Kwame&quot;,<br>  &quot;receiver&quot;: &quot;Ama&quot;,<br>  &quot;amount&quot;: 100<br>}</pre><p>The first time the payment system sees this key, it processes the payment normally.</p><p>It stores:</p><ul><li>the idempotency key</li><li>the transaction ID</li><li>the response</li></ul><p>If another request later arrives with the same key, the system recognizes it immediately.</p><p>Instead of processing the payment again, it simply returns the original response.</p><p>No second debit.</p><p>No second credit.</p><p>No duplicate payment.</p><h3>Without vs With Idempotency</h3><p>Without idempotency:</p><pre>Request 1 → Process payment</pre><pre>Request 2 → Process payment again</pre><p>Result:</p><p><strong>Kwame is charged twice.</strong></p><p>With idempotency:</p><pre>Request 1 → Process payment</pre><pre>Request 2 → Return previous response</pre><p>Result:</p><p><strong>Kwame is charged once.</strong></p><p>The request happened twice.</p><p>The effect happened once.</p><p>That’s idempotency.</p><h3>Why the Ledger Isn’t Enough</h3><p>Earlier in this series, we learned that the ledger is the source of financial truth.</p><p>That’s still true.</p><p>But the ledger alone can’t prevent duplicate payments.</p><p>Imagine the same request is processed twice.</p><p>The ledger would contain two perfectly valid transfers.</p><pre>| Account      | Entry  | Amount  |<br>| ------------ | ------ | ------- |<br>| Kwame Wallet | Debit  | GHS 100 |<br>| Ama Wallet   | Credit | GHS 100 |<br>| Kwame Wallet | Debit  | GHS 100 |<br>| Ama Wallet   | Credit | GHS 100 |</pre><p>Everything balances.</p><p>Every debit has a matching credit.</p><p>From an accounting perspective, nothing is wrong.</p><p>The problem is that Kwame only intended to send money once.</p><p>That’s why payment systems need both:</p><ul><li>A reliable ledger.</li><li>Idempotent request handling.</li></ul><p>The ledger records financial truth.</p><p>Idempotency ensures that truth is only recorded once for a single payment request.</p><h3>Why Software Engineers Should Care</h3><p>Understanding idempotency helps you:</p><ul><li>Prevent duplicate charges.</li><li>Design safer payment APIs.</li><li>Support automatic retries.</li><li>Improve customer trust.</li><li>Build resilient distributed systems.</li></ul><p>It’s one of those concepts users never think about.</p><p>But they immediately notice when it’s missing.</p><h3>A Principle Worth Remembering</h3><p>Earlier in this series, we learned:</p><blockquote><strong><em>The ledger is the source of financial truth.</em></strong></blockquote><p>Then we learned:</p><blockquote><strong><em>A payment is a journey through states.</em></strong></blockquote><p>Now we can add another principle:</p><blockquote><strong><em>The same payment request should only change the system once.</em></strong></blockquote><p>Customers may retry.</p><p>Applications may retry.</p><p>Networks may retry.</p><p>The outcome should remain the same.</p><h3>Final Thoughts</h3><p>When Kwame taps <strong>Send</strong>, he doesn’t care whether the network timed out or the mobile app retried the request.</p><p>He expects one thing.</p><p>If he intended to send <strong>GHS 100</strong>, he should only be charged <strong>GHS 100</strong>.</p><p>Making that expectation a reality is one of the responsibilities of a payment system.</p><p>Idempotency quietly protects millions of transactions every day by ensuring that duplicate requests don’t become duplicate payments.</p><p>It’s a simple idea.</p><p>But it’s one of the foundations of reliable payment systems.</p><p>In the next post, we’ll explore <strong>Atomicity and Consistency</strong> — why payment systems refuse to move money halfway, and why a transaction either completes entirely or doesn’t happen at all.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=616a646ac9e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>