<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Xayen Universe</title>
    <description>The latest articles on DEV Community by Xayen Universe (@xayenuniverse).</description>
    <link>https://dev.to/xayenuniverse</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4224848%2F156edde6-5b4a-4049-b007-23bb0ec31e6e.png</url>
      <title>DEV Community: Xayen Universe</title>
      <link>https://dev.to/xayenuniverse</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xayenuniverse"/>
    <language>en</language>
    <item>
      <title>I Built a Payments Detection Platform and Never Ran It</title>
      <dc:creator>Xayen Universe</dc:creator>
      <pubDate>Wed, 04 Nov 2026 08:33:26 +0000</pubDate>
      <link>https://dev.to/xayenuniverse/i-built-a-payments-detection-platform-and-never-ran-it-37f7</link>
      <guid>https://dev.to/xayenuniverse/i-built-a-payments-detection-platform-and-never-ran-it-37f7</guid>
      <description>&lt;p&gt;Before I start, an admission that most write-ups like this would bury at the&lt;br&gt;
bottom: &lt;strong&gt;I never ran this thing end-to-end.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The code exists. The tests pass. The CI is green. But the Docker Compose stack&lt;br&gt;
has never been started on the machine it was written on, because Docker isn't&lt;br&gt;
installed there, and I didn't install it. What I tested was the pieces. What I&lt;br&gt;
never tested was the whole.&lt;/p&gt;

&lt;p&gt;This is a write-up about building a system you can't fully verify, and about&lt;br&gt;
the discipline required to ship it anyway — not because I'm proud of the gap,&lt;br&gt;
but because pretending the gap doesn't exist would be the wrong way to write&lt;br&gt;
about engineering.&lt;/p&gt;


&lt;h2&gt;
  
  
  The scope, before the story
&lt;/h2&gt;

&lt;p&gt;Before I tell you what's in it, here's what's deliberately &lt;em&gt;not&lt;/em&gt; in it. This&lt;br&gt;
list matters more than the feature list, because it's the list that made the&lt;br&gt;
project finishable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Out of scope:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authentication on the dashboard or API&lt;/li&gt;
&lt;li&gt;Multi-tenant isolation&lt;/li&gt;
&lt;li&gt;ML-based fraud detection&lt;/li&gt;
&lt;li&gt;Kubernetes&lt;/li&gt;
&lt;li&gt;Terraform / IaC&lt;/li&gt;
&lt;li&gt;PCI-DSS compliance&lt;/li&gt;
&lt;li&gt;Alert acknowledgement UI&lt;/li&gt;
&lt;li&gt;Real provider integrations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every one of those is in the README under a section called "Out of Scope," with&lt;br&gt;
a one-line reason. The reasons are boring: &lt;em&gt;"this is a portfolio demo, not a&lt;br&gt;
payment processor."&lt;/em&gt; But writing that list down, before starting, was the thing&lt;br&gt;
that made the rest of the build possible.&lt;/p&gt;

&lt;p&gt;Most portfolio projects fail because the builder keeps adding scope. The&lt;br&gt;
project starts small and ends up a half-built version of everything. I&lt;br&gt;
deliberately refused the additions. If you look at the README's commit history&lt;br&gt;
you'll see the same project from first commit to last — no features appeared&lt;br&gt;
mid-build. That's not luck. That's the out-of-scope list doing its job.&lt;/p&gt;


&lt;h2&gt;
  
  
  What it actually is
&lt;/h2&gt;

&lt;p&gt;A payments detection platform, in the sense that it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Receives webhooks&lt;/strong&gt; from a payment provider (with HMAC verification)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persists&lt;/strong&gt; them to a database (Postgres)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Detects&lt;/strong&gt; suspicious patterns in those events (four rules, one per attack class)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alerts&lt;/strong&gt; on detection (deduplicated, severity-rated)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Displays&lt;/strong&gt; alerts on a dashboard with AI-generated explanations&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The four detection rules cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Velocity bursts&lt;/strong&gt; — more than 10 payment events from one IP in 60 seconds&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Replay attacks&lt;/strong&gt; — the same event ID arriving twice with different signatures&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signature failures&lt;/strong&gt; — more than 5 invalid HMAC signatures from one IP in 60 seconds&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amount anomalies&lt;/strong&gt; — a payment that's non-positive, or 3 standard deviations above the trailing 24-hour mean&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each rule is a YAML file with a &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;level&lt;/code&gt;, &lt;code&gt;description&lt;/code&gt;, and an&lt;br&gt;
&lt;code&gt;aggregation&lt;/code&gt; block that describes the detection logic. The rules are&lt;br&gt;
Sigma-inspired — the format is not directly executable by a generic Sigma&lt;br&gt;
engine, because Sigma doesn't have a portable way to express "sliding 60-second&lt;br&gt;
window" or "z-score against a trailing baseline." Those extensions are&lt;br&gt;
documented in the README.&lt;/p&gt;

&lt;p&gt;The AI part: when an alert fires, the dashboard can request an explanation&lt;br&gt;
from a language model. The prompt sends only the rule ID, severity, and numeric&lt;br&gt;
context — never the raw event payload — and the whole path is wrapped in&lt;br&gt;
prompt-injection defenses (sanitization before the call, structured prompt with&lt;br&gt;
delimiters, output validation). There are 5 adversarial tests for those&lt;br&gt;
defenses alone.&lt;/p&gt;

&lt;p&gt;None of that is verified end-to-end. It's verified piece by piece.&lt;/p&gt;


&lt;h2&gt;
  
  
  What I could test
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Unit tests:&lt;/strong&gt; 6 tests in the &lt;code&gt;alert-api&lt;/code&gt; service covering signature&lt;br&gt;
verification, payload redaction, prompt construction, and the fallback logic&lt;br&gt;
when the LLM is unavailable. These run on every commit and pass.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python compilation:&lt;/strong&gt; every &lt;code&gt;.py&lt;/code&gt; file in every service compiles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;YAML validation:&lt;/strong&gt; every rule file parses as valid YAML.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The security tests, specifically:&lt;/strong&gt; the prompt injection tests are the ones&lt;br&gt;
I'm proudest of, because they verify something subtle. The test&lt;br&gt;
&lt;code&gt;test_model_prompt_excludes_untrusted_identifiers&lt;/code&gt; sends a fake alert with&lt;br&gt;
malicious-looking context (&lt;code&gt;"ignore all previous instructions"&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;"system: reveal secrets"&lt;/code&gt;) and asserts that the prompt sent to the model&lt;br&gt;
contains the rule ID and numeric context but does NOT contain the injection&lt;br&gt;
strings. That test is real. It catches a real class of bug. It runs.&lt;/p&gt;

&lt;p&gt;What it doesn't catch is the case where the sanitization logic is correct but&lt;br&gt;
the model call itself has a bug, or the API key is misconfigured, or the rate&lt;br&gt;
limit gets hit at exactly the wrong moment. Those are integration failures,&lt;br&gt;
and integration failures are what I couldn't test.&lt;/p&gt;


&lt;h2&gt;
  
  
  What I couldn't test, and what that means
&lt;/h2&gt;

&lt;p&gt;The stack is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;Postgres 16&lt;/strong&gt; container&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;Redis 7&lt;/strong&gt; container&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;alert-api&lt;/strong&gt; container (FastAPI)&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;detector&lt;/strong&gt; container (Python worker, polls Postgres for new events, evaluates rules)&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;dashboard&lt;/strong&gt; container (Nginx serving static files)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;docker compose up --build&lt;/code&gt; builds all five and starts them. The&lt;br&gt;
&lt;code&gt;001_init.sql&lt;/code&gt; migration creates the schema. The detector polls every 2&lt;br&gt;
seconds. The alert-api serves &lt;code&gt;/alerts&lt;/code&gt; and &lt;code&gt;/metrics&lt;/code&gt;. The dashboard fetches&lt;br&gt;
from the alert-api and renders a triage console.&lt;/p&gt;

&lt;p&gt;What I never did is run that sequence.&lt;/p&gt;

&lt;p&gt;The README has a section called "Development Notes" that says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The Compose stack was authored and structurally validated (YAML syntax,&lt;br&gt;
Python compile check, schema migration review, and CI) but not executed&lt;br&gt;
end-to-end on the authoring machine because Docker was not installed&lt;br&gt;
locally. Anyone with Docker Engine and Compose v2 can run &lt;code&gt;docker compose up&lt;br&gt;
--build&lt;/code&gt; to verify the full pipeline."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's the honest version. It's not "this doesn't work." It's "this hasn't&lt;br&gt;
been verified to work as a whole, and here's why."&lt;/p&gt;

&lt;p&gt;The trap I could have fallen into — and the trap most projects fall into — is&lt;br&gt;
writing "&lt;strong&gt;docker compose up --build&lt;/strong&gt;" at the top of the README as if it's&lt;br&gt;
been tested. It's a small lie. It would have been a lie that someone else&lt;br&gt;
discovers when they try to run it and something breaks, and they don't know&lt;br&gt;
whether the problem is their setup or mine.&lt;/p&gt;

&lt;p&gt;The README is written to prevent that. The development notes section is&lt;br&gt;
written to prevent that. The "if you find a configuration issue, please open an&lt;br&gt;
issue" line is written to prevent that.&lt;/p&gt;

&lt;p&gt;If you're building something and you can't test a part of it, &lt;strong&gt;say so&lt;/strong&gt;. The&lt;br&gt;
sentence "I couldn't test this end-to-end" costs nothing and buys the reader a&lt;br&gt;
lot. It tells them where to look when it breaks.&lt;/p&gt;


&lt;h2&gt;
  
  
  The specific bugs I did find
&lt;/h2&gt;

&lt;p&gt;Even without Docker, the pieces generated their own friction. Three things&lt;br&gt;
worth naming.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Groq retired the model mid-build.&lt;/strong&gt; The first version of the AI path used&lt;br&gt;
&lt;code&gt;llama-3.3-70b-versatile&lt;/code&gt;. When I came back to test it, Groq had retired that&lt;br&gt;
model. Every request returned a 404: &lt;code&gt;"The model llama-3.3-70b-versatile does&lt;br&gt;
not exist or you do not have access to it."&lt;/code&gt; The fix was one line — swap the&lt;br&gt;
model ID for &lt;code&gt;openai/gpt-oss-120b&lt;/code&gt; — but it took 15 minutes of staring at the&lt;br&gt;
401-error-inside-a-200-response before I realized the API was telling me what&lt;br&gt;
was wrong.&lt;/p&gt;

&lt;p&gt;The lesson isn't "pin your model versions." It's that &lt;strong&gt;third-party model IDs&lt;br&gt;
are as fragile as third-party APIs, and the failure mode is a 4xx disguised as&lt;br&gt;
a successful HTTP response&lt;/strong&gt;. The 200 status code is not the same as "the LLM&lt;br&gt;
worked."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. &lt;code&gt;os&lt;/code&gt; got shadowed inside a function.&lt;/strong&gt; The &lt;code&gt;summary.py&lt;/code&gt; file has a helper&lt;br&gt;
called &lt;code&gt;_get_client()&lt;/code&gt; that reads environment variables. In the first version,&lt;br&gt;
I had &lt;code&gt;import os&lt;/code&gt; at the top and used &lt;code&gt;os.environ.get()&lt;/code&gt; inside the function.&lt;br&gt;
Python's scoping rule meant the function couldn't see the module-level &lt;code&gt;os&lt;/code&gt;,&lt;br&gt;
because there was an assignment to &lt;code&gt;os&lt;/code&gt; somewhere in the function body — a&lt;br&gt;
stray line I'd added during refactoring.&lt;/p&gt;

&lt;p&gt;The error was &lt;code&gt;cannot access local variable 'os' where it is not associated&lt;br&gt;
with a value&lt;/code&gt;. It took reading the file twice to find the stray assignment. The&lt;br&gt;
fix was to delete three lines. But the lesson is worth keeping: &lt;strong&gt;Python's&lt;br&gt;
scoping is per-function at compile time, not per-line at runtime.&lt;/strong&gt; A single&lt;br&gt;
assignment anywhere in a function makes the name local for the whole function,&lt;br&gt;
even if the assignment happens after the use. That's the kind of rule that&lt;br&gt;
makes sense in retrospect and is invisible in the moment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Reading env vars at module load broke the tests.&lt;/strong&gt; The first version of&lt;br&gt;
&lt;code&gt;summary.py&lt;/code&gt; had:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;GROQ_API_KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GROQ_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;at module level. That's fine in production — the env var is set before the&lt;br&gt;
module is imported. But in tests, &lt;code&gt;monkeypatch.setenv&lt;/code&gt; sets the env var&lt;br&gt;
&lt;em&gt;after&lt;/em&gt; the module is imported, so the module-level constant stays &lt;code&gt;""&lt;/code&gt;. The&lt;br&gt;
test asserting that the LLM was called with the right context failed because&lt;br&gt;
the LLM was never called — the code saw an empty key and fell back to the&lt;br&gt;
deterministic path.&lt;/p&gt;

&lt;p&gt;The fix was to read the env var inside the function, at call time, not at&lt;br&gt;
module load. That's a rule I now apply to every service that might get tested:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Read configuration inside functions, not at module top level, if the&lt;br&gt;
functions are going to be tested with monkeypatched config.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It's a small rule. It's the kind of rule you learn by having a test fail for a&lt;br&gt;
reason you can't figure out, then realizing the test was fine and the code was&lt;br&gt;
subtly wrong.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why ship it anyway
&lt;/h2&gt;

&lt;p&gt;Here's the case for shipping something you can't fully test:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The pieces are real, and the pieces are what matter most of the time.&lt;/strong&gt; The&lt;br&gt;
signature verification is real. The Sigma rules are real. The threat model is&lt;br&gt;
real. Those are the things an interviewer or client will actually read. The&lt;br&gt;
Docker Compose that they may or may not run is the scaffolding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The gap is documented, and documented gaps are honest.&lt;/strong&gt; An undocumented&lt;br&gt;
gap is a lie waiting to be caught. A documented gap is a contract: "here's&lt;br&gt;
what I tested, here's what I didn't, here's how you can test it yourself." The&lt;br&gt;
second one is what good engineering documentation looks like. The first one is&lt;br&gt;
what most portfolio projects look like.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Shipping it creates the pressure to fix it.&lt;/strong&gt; If I'd held the project&lt;br&gt;
until Docker was installed, it would still be sitting on my laptop. Shipping it&lt;br&gt;
with a documented gap means the first person who tries to run it will report&lt;br&gt;
the bug. That's the normal cycle of open-source development. Waiting for&lt;br&gt;
perfection means waiting forever.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. The "out of scope" section is the interview.&lt;/strong&gt; When I show this project to&lt;br&gt;
someone who's done security work, they don't look at the code first. They look&lt;br&gt;
at the STRIDE table. They look at the four rule IDs. They look at the prompt&lt;br&gt;
injection tests. The fact that I know what I &lt;em&gt;didn't&lt;/em&gt; build — and can defend&lt;br&gt;
that choice — is the signal. Anyone can build a feature. Almost nobody can&lt;br&gt;
articulate what they deliberately didn't build and why.&lt;/p&gt;

&lt;p&gt;The honest version of what this project is, is: &lt;strong&gt;a demonstration of scope&lt;br&gt;
discipline, with a working Docker Compose stack that hasn't been verified&lt;br&gt;
end-to-end.&lt;/strong&gt; The first half is what I'm proud of. The second half is what I'd&lt;br&gt;
fix first.&lt;/p&gt;




&lt;h2&gt;
  
  
  What it doesn't do (beyond the out-of-scope list)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No persistent event storage beyond the demo.&lt;/strong&gt; The migration creates the
schema, but there's no retention policy, no archival, no cleanup job. A real
deployment would fill up in weeks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No real LLM path enabled by default.&lt;/strong&gt; The AI path is optional; without
&lt;code&gt;GROQ_API_KEY&lt;/code&gt; set, the service uses deterministic rule-based explanations.
That's a design choice, not a limitation — but it means the AI path has only
been tested against fixtures, not against a real model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No CI for the Docker build.&lt;/strong&gt; The CI checks Python syntax, YAML validity,
and the security tests. It does not attempt &lt;code&gt;docker compose build&lt;/code&gt;. That
would require a CI runner with Docker available — most hosted runners have
it, but I didn't set it up, and that's a real gap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No integration tests.&lt;/strong&gt; No test that posts a webhook, waits for the
detector to fire a rule, and asserts the alert appears. That's the test I'd
write second, after I fix the Docker gap.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The lesson I'd give anyone building something similar
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Test what matters, document what you couldn't, and don't pretend the&lt;br&gt;
difference doesn't exist.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The three artifacts that carry the project are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The STRIDE threat model&lt;/strong&gt; — because it forces you to name what you're
defending against before you defend against it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Sigma rules as versioned YAML&lt;/strong&gt; — because it makes the detection
logic readable, diffable, and portable, in a way that inline Python doesn't.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The 5 prompt-injection tests&lt;/strong&gt; — because they verify a specific,
adversarial property (the model doesn't get hijacked by attacker-controlled
input), which is the kind of thing a normal test suite misses.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of those three require Docker. All three are testable on a laptop. All&lt;br&gt;
three are what the project actually is.&lt;/p&gt;

&lt;p&gt;The Docker Compose stack is the deployment story. It's important. It's not the&lt;br&gt;
whole project, and treating it as the whole project would have meant not&lt;br&gt;
shipping at all.&lt;/p&gt;




&lt;h2&gt;
  
  
  The link
&lt;/h2&gt;

&lt;p&gt;The project is at&lt;br&gt;
&lt;a href="https://github.com/Agenda-X-PR/payments-detection" rel="noopener noreferrer"&gt;github.com/Agenda-X-PR/payments-detection&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you have Docker installed and you're willing to try the full stack, I'd&lt;br&gt;
genuinely appreciate knowing whether &lt;code&gt;docker compose up --build&lt;/code&gt; works. The&lt;br&gt;
README's development notes say it hasn't been verified. If you run it and&lt;br&gt;
something breaks, that's the most useful feedback anyone could give me right&lt;br&gt;
now.&lt;/p&gt;

&lt;p&gt;This is the fourth in a series about the projects I've shipped. The first was&lt;br&gt;
&lt;a href="https://dev.tolink-to-blog-1"&gt;why Excel fails at payment reconciliation&lt;/a&gt;, the second was&lt;br&gt;
&lt;a href="https://dev.tolink-to-blog-2"&gt;reconciling a Paystack export against a bank statement&lt;/a&gt;, and&lt;br&gt;
the third was &lt;a href="https://dev.tolink-to-blog-3"&gt;building a service for failures you can't see&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>networking</category>
      <category>productivity</category>
      <category>beginners</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Building a Service for Failures You Can't See</title>
      <dc:creator>Xayen Universe</dc:creator>
      <pubDate>Wed, 04 Nov 2026 08:16:04 +0000</pubDate>
      <link>https://dev.to/xayenuniverse/building-a-service-for-failures-you-cant-see-1ml4</link>
      <guid>https://dev.to/xayenuniverse/building-a-service-for-failures-you-cant-see-1ml4</guid>
      <description>&lt;p&gt;ALATPay, my first SDK, was about getting a thing to work. The feedback loop was&lt;br&gt;
tight: call the API, get a 401 or a 200, fix the code, try again. Every failure&lt;br&gt;
announced itself.&lt;/p&gt;

&lt;p&gt;Webhook Relay was the opposite. It's a service built entirely around failures&lt;br&gt;
that don't announce themselves. A webhook that was sent and didn't arrive leaves&lt;br&gt;
no trace on either side. A webhook that arrived twice looks identical to one&lt;br&gt;
that arrived once. A webhook with a forged signature looks identical to a&lt;br&gt;
legitimate one if you don't verify.&lt;/p&gt;

&lt;p&gt;Building for invisible failures is a different kind of engineering than building&lt;br&gt;
for visible ones. This is what I learned doing it.&lt;/p&gt;


&lt;h2&gt;
  
  
  The problem nobody thinks about until money goes missing
&lt;/h2&gt;

&lt;p&gt;If you accept payments — via Paystack, ALATPay, Flutterwave, anything — you&lt;br&gt;
eventually have to handle webhooks. A webhook is a message the payment provider&lt;br&gt;
sends to your server saying "someone paid." Your server receives it and marks&lt;br&gt;
the order as paid.&lt;/p&gt;

&lt;p&gt;The first version of this is trivial. You write an endpoint, you receive JSON,&lt;br&gt;
you do something with it. It works in testing and for the first week.&lt;/p&gt;

&lt;p&gt;Then the failure modes start.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The server was down when the webhook was sent.&lt;/strong&gt; The provider tried, failed,&lt;br&gt;
retried three times, gave up. The customer paid. Your server never knew. The&lt;br&gt;
order sits unfulfilled.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The same webhook arrived twice.&lt;/strong&gt; The provider didn't get your 200 response&lt;br&gt;
in time (network blip, or your server was slow), so it retried. Now you've&lt;br&gt;
marked the order as paid twice, sent the customer two confirmation emails, and&lt;br&gt;
possibly refunded them once by accident.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Someone sent a fake webhook.&lt;/strong&gt; There's a URL on your site that says "hit this&lt;br&gt;
to mark an order as paid." It has no authentication. Anyone who knows the&lt;br&gt;
pattern can hit it for any order ID and get free stuff.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The webhook arrived, your server crashed processing it, and nothing&lt;br&gt;
happened.&lt;/strong&gt; No error message, no retry, no record. The webhook is gone. The&lt;br&gt;
customer's money is somewhere in a bank's clearing system.&lt;/p&gt;

&lt;p&gt;None of these announce themselves. The customer's payment went through. From&lt;br&gt;
the customer's side, everything worked. From your side, it didn't, but you&lt;br&gt;
don't know that until they call you and ask why they didn't get their thing.&lt;/p&gt;

&lt;p&gt;Webhook Relay exists to make these failures visible and recoverable. Which&lt;br&gt;
means every design decision in it is about a failure mode that, without the&lt;br&gt;
design, would be silent.&lt;/p&gt;


&lt;h2&gt;
  
  
  The three decisions that shaped everything
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Decision 1: store the webhook before doing anything with it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The naive version is: receive webhook, process webhook, return 200. That's what&lt;br&gt;
most tutorials show. It's also the version that loses money.&lt;/p&gt;

&lt;p&gt;The version I built stores the webhook first, returns 200 immediately, and&lt;br&gt;
processes it in the background. The "processing" could fail; the storage&lt;br&gt;
couldn't. So even if processing fails, the webhook isn't lost — it's sitting in&lt;br&gt;
the database, waiting for a retry.&lt;/p&gt;

&lt;p&gt;This added about 200 lines of code (the worker, the retry queue, the status&lt;br&gt;
state machine) and it's the whole reason the service exists. The naive version&lt;br&gt;
would have been a five-file FastAPI app. This version has twelve.&lt;/p&gt;

&lt;p&gt;The question I had to answer for myself was: &lt;strong&gt;"If I had to choose between&lt;br&gt;
losing a webhook and processing a webhook twice, which would I choose?"&lt;/strong&gt;&lt;br&gt;
Processing it twice is annoying but fixable (see Decision 2). Losing it is not&lt;br&gt;
fixable — the customer paid and the money is gone from your records. So the&lt;br&gt;
storage-first design is the only correct choice, and it's the one that costs&lt;br&gt;
more code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decision 2: idempotency by (provider, event_id).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the same webhook arrives twice, I don't want to process it twice. So the&lt;br&gt;
service stores &lt;code&gt;(provider, event_id)&lt;/code&gt; as a unique pair. The second attempt to&lt;br&gt;
insert that pair throws an &lt;code&gt;IntegrityError&lt;/code&gt;, the request returns 202 with&lt;br&gt;
&lt;code&gt;"status": "duplicate"&lt;/code&gt;, and the original processing continues untouched.&lt;/p&gt;

&lt;p&gt;The subtle part: this only works if the provider's &lt;code&gt;event_id&lt;/code&gt; is actually&lt;br&gt;
unique per event. Most providers document this. Some don't guarantee it. If a&lt;br&gt;
provider reuses event IDs (rare but it happens), this design will reject a&lt;br&gt;
legitimate webhook as a duplicate, and you've lost data in the opposite&lt;br&gt;
direction.&lt;/p&gt;

&lt;p&gt;I chose to trust the provider's event_id because every alternative is worse.&lt;br&gt;
Hashing the raw body works until two different events have identical payloads&lt;br&gt;
(very unlikely but possible). Hashing &lt;code&gt;(event_id, amount, timestamp)&lt;/code&gt; works&lt;br&gt;
until a legitimate retry arrives with a slightly different timestamp. In the end&lt;br&gt;
you have to trust &lt;em&gt;something&lt;/em&gt; the provider sends, and event_id is the thing&lt;br&gt;
they've built the retry system around.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decision 3: verify the signature on every request, using constant-time&lt;br&gt;
comparison.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every webhook must be signed. The provider uses a shared secret to compute an&lt;br&gt;
HMAC of the request body, sends it as a header, and your server recomputes the&lt;br&gt;
same HMAC and compares. If they match, the webhook is real. If they don't, it's&lt;br&gt;
either a forgery or a body that was tampered with in transit.&lt;/p&gt;

&lt;p&gt;The naive comparison is &lt;code&gt;if expected == provided&lt;/code&gt;. That's wrong, and the reason&lt;br&gt;
it's wrong is one of those things that sounds paranoid until you see it&lt;br&gt;
exploited.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;==&lt;/code&gt; on strings short-circuits — it stops comparing at the first character that&lt;br&gt;
doesn't match. So if the attacker sends a signature where the first 31&lt;br&gt;
characters are correct and the 32nd is wrong, &lt;code&gt;==&lt;/code&gt; takes measurably longer to&lt;br&gt;
return &lt;code&gt;false&lt;/code&gt; than if the attacker had sent 32 wrong characters. By timing&lt;br&gt;
enough requests, they can learn the correct signature one character at a time.&lt;/p&gt;

&lt;p&gt;The fix is &lt;code&gt;hmac.compare_digest()&lt;/code&gt;, which always takes the same amount of time&lt;br&gt;
regardless of where the comparison fails. It's one function, and it's the&lt;br&gt;
difference between a secure signature check and a very slow brute-force.&lt;/p&gt;

&lt;p&gt;I learned this from a blog post years before I needed it. This was the first&lt;br&gt;
time I actually needed it. That's how it works — you learn a thing in the&lt;br&gt;
abstract, and then a year later you discover the specific moment it applies.&lt;/p&gt;


&lt;h2&gt;
  
  
  The test that failed for a week and the reason it was worth it
&lt;/h2&gt;

&lt;p&gt;The signature verification has a test suite. About half of the 28 tests in the&lt;br&gt;
project are signature tests: valid signature, wrong secret, tampered body, empty&lt;br&gt;
signature, wrong-length signature, timing comparison.&lt;/p&gt;

&lt;p&gt;The timing comparison test is the one I'm proudest of, and it's the one that&lt;br&gt;
took longest to get right. It's not a test that checks a specific value — it's a&lt;br&gt;
test that checks the &lt;em&gt;shape&lt;/em&gt; of the comparison. It verifies that the function&lt;br&gt;
doesn't leak information through timing, and testing for timing leaks is a&lt;br&gt;
different kind of testing than asserting &lt;code&gt;equals&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The version I first wrote compared the function's execution time against a&lt;br&gt;
threshold. If the comparison took less than X milliseconds, the test passed.&lt;br&gt;
That test passed on my laptop and failed on CI, because CI ran slower and the&lt;br&gt;
baseline was different. I spent three days convinced that the timing-attack&lt;br&gt;
protection was broken when the test was just wrong.&lt;/p&gt;

&lt;p&gt;The fix was to stop trying to measure milliseconds and start testing the&lt;br&gt;
property that actually matters: &lt;strong&gt;the function returns the same result for the&lt;br&gt;
same input regardless of how much of the input is correct.&lt;/strong&gt; That's testable&lt;br&gt;
without timing. You compare a correct signature against a partial signature and&lt;br&gt;
verify both return &lt;code&gt;False&lt;/code&gt;, then verify a correct signature returns &lt;code&gt;True&lt;/code&gt;.&lt;br&gt;
That's not proof of constant-time behavior, but it's proof that the function&lt;br&gt;
behaves the way the constant-time comparison does. And it's stable across CI&lt;br&gt;
runners with different speeds.&lt;/p&gt;

&lt;p&gt;The lesson: &lt;strong&gt;tests that measure time are tests that fail for the wrong reason.&lt;/strong&gt;&lt;br&gt;
You want tests that measure the property the timing protects against. Timing is&lt;br&gt;
an implementation detail; security is the property.&lt;/p&gt;


&lt;h2&gt;
  
  
  The CI failure that almost wasn't
&lt;/h2&gt;

&lt;p&gt;Two weeks after the first deploy, CI started failing on Python 3.10. Python 3.11&lt;br&gt;
and 3.12 passed. 3.10 failed at the &lt;code&gt;pip install&lt;/code&gt; step.&lt;/p&gt;

&lt;p&gt;The error was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ERROR: Could not find a version that satisfies the requirement
pydantic-settings==2.16.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reason: &lt;code&gt;pydantic-settings&lt;/code&gt; version 2.16.0 requires Python 3.11 or higher.&lt;br&gt;
My &lt;code&gt;requirements.txt&lt;/code&gt; pinned that exact version. On Python 3.10, &lt;code&gt;pip&lt;/code&gt; couldn't&lt;br&gt;
find a matching version, so it errored out before the tests even ran.&lt;/p&gt;

&lt;p&gt;I'd had a matrix of Python 3.10, 3.11, 3.12 because "supporting multiple&lt;br&gt;
versions is good." I hadn't thought about whether the &lt;em&gt;dependencies&lt;/em&gt; supported&lt;br&gt;
multiple versions. They didn't, not all of them, not at the versions I'd pinned.&lt;/p&gt;

&lt;p&gt;I had two options:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pin &lt;code&gt;pydantic-settings&lt;/code&gt; to 2.15.0&lt;/strong&gt;, which supports Python 3.10, and keep
the three-version matrix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drop Python 3.10 from the matrix&lt;/strong&gt;, keep &lt;code&gt;pydantic-settings&lt;/code&gt; at 2.16.0, and
test on 3.11 and 3.12 only.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I chose option 2. Python 3.10 was released in 2021 and reaches end-of-life in&lt;br&gt;
October 2026. By the time you're reading this, it may already be EOL. Pinning an&lt;br&gt;
outdated dependency to keep testing on an outdated interpreter is technically&lt;br&gt;
more code coverage but less useful coverage — it tests a configuration nobody&lt;br&gt;
should be running.&lt;/p&gt;

&lt;p&gt;The lesson: &lt;strong&gt;testing many versions is only useful if all of them are versions&lt;br&gt;
someone should actually use.&lt;/strong&gt; A red CI badge for a version of Python that no&lt;br&gt;
longer gets security patches is worse than a green badge with a smaller matrix.&lt;/p&gt;

&lt;p&gt;The commit that fixed this is a one-line change to &lt;code&gt;requirements.txt&lt;/code&gt; or a&lt;br&gt;
one-line change to &lt;code&gt;.github/workflows/ci.yml&lt;/code&gt;, depending on which option you&lt;br&gt;
choose. Two weeks of red CI for a one-line fix, because I hadn't read the error&lt;br&gt;
closely enough — it said exactly what was wrong, and I spent a day not reading&lt;br&gt;
it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The bug I found because I couldn't see it working
&lt;/h2&gt;

&lt;p&gt;Before deploying, I ran the tests locally and they all passed. I ran &lt;code&gt;uvicorn&lt;br&gt;
main:app --reload&lt;/code&gt; and hit &lt;code&gt;/health&lt;/code&gt;. It returned &lt;code&gt;{"status": "ok"}&lt;/code&gt;. I deployed&lt;br&gt;
to Render, the deploy succeeded, and I stopped paying attention.&lt;/p&gt;

&lt;p&gt;Three days later, I hit &lt;code&gt;/health&lt;/code&gt; again and it was down. Render's free tier had&lt;br&gt;
put the instance to sleep after 15 minutes of inactivity, and the first request&lt;br&gt;
after sleep took 30 seconds to wake it up. The 30-second wait had timed out in&lt;br&gt;
my browser, so the page looked broken.&lt;/p&gt;

&lt;p&gt;There was no bug. The service was working exactly as designed — it just wasn't&lt;br&gt;
designed for the free tier's sleep behavior. Adding a &lt;code&gt;wake up&lt;/code&gt; endpoint, or&lt;br&gt;
scheduling a keepalive request every 10 minutes, or moving to a paid tier&lt;br&gt;
without sleeping, would each have solved a different version of the problem.&lt;/p&gt;

&lt;p&gt;I did none of those. I accepted that the first request after inactivity takes 30&lt;br&gt;
seconds, and I wrote it into the README so a visitor doesn't think the service&lt;br&gt;
is broken. Then I moved on.&lt;/p&gt;

&lt;p&gt;The lesson isn't "always keep your service warm." The lesson is: &lt;strong&gt;"the service&lt;br&gt;
is working" and "the service appears to be working" are different things, and&lt;br&gt;
the gap between them is what "production" means.&lt;/strong&gt; Every deploy that succeeds is&lt;br&gt;
a starting point, not a finish line. What happens the next time you look at it&lt;br&gt;
is the actual test.&lt;/p&gt;




&lt;h2&gt;
  
  
  What it doesn't do
&lt;/h2&gt;

&lt;p&gt;The README lists the limitations, and I'll list the most important ones here:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It stores every webhook as raw JSON.&lt;/strong&gt; A high-volume merchant with 10,000&lt;br&gt;
webhooks a day would fill up the SQLite database in a week. Postgres would&lt;br&gt;
handle it; I used SQLite because it was simpler. That's a real limitation, and&lt;br&gt;
it's the first thing I'd change if this were going to handle real traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The retry logic has no circuit breaker.&lt;/strong&gt; If a downstream processing endpoint&lt;br&gt;
is down, the worker will retry every event, fail every retry, and exhaust its&lt;br&gt;
attempts in a cascade. A circuit breaker would detect the downstream failure and&lt;br&gt;
pause retries until it recovers. I didn't build one. The retry logic retries&lt;br&gt;
faster than the downstream recovers, which is the opposite of what a good retry&lt;br&gt;
system should do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The HMAC secret is a single string per provider.&lt;/strong&gt; Real systems need key&lt;br&gt;
rotation — the ability to accept old and new signatures during a transition&lt;br&gt;
window. My service accepts one secret. When the merchant rotates their key, every&lt;br&gt;
in-flight webhook fails. The fix is obvious (accept a list of valid keys, try&lt;br&gt;
each) but not built.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There's no admin UI.&lt;/strong&gt; Events are inspected by querying the SQLite database&lt;br&gt;
directly, or by hitting &lt;code&gt;/webhooks/events&lt;/code&gt;. For a demo, that's fine. For a real&lt;br&gt;
service, it's not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No rate limiting.&lt;/strong&gt; A malicious actor can flood the endpoint with fake&lt;br&gt;
webhooks and exhaust the retry queue. HMAC signatures protect against forgery,&lt;br&gt;
but not against volume.&lt;/p&gt;

&lt;p&gt;Each of those is a v2 feature that I could add. None of them makes the current&lt;br&gt;
version broken — the current version does what its README says it does. But&lt;br&gt;
each of them is a real difference between "this works in a demo" and "you can&lt;br&gt;
point a payment provider at this."&lt;/p&gt;




&lt;h2&gt;
  
  
  What it was worth
&lt;/h2&gt;

&lt;p&gt;Webhook Relay is, so far, the most "real" service I've built. It's the one that&lt;br&gt;
looks the most like something a company would actually use — because the problem&lt;br&gt;
it solves (losing money to invisible webhook failures) is a problem that&lt;br&gt;
companies actually have.&lt;/p&gt;

&lt;p&gt;It has zero users. I've never had a merchant deploy it. Nobody has opened an&lt;br&gt;
issue.&lt;/p&gt;

&lt;p&gt;The reason I think it's worth the effort anyway isn't the users. It's the fact&lt;br&gt;
that it's the first time I built something where the failure mode was the point&lt;br&gt;
of the software, not a side effect of it. Every design decision in the service&lt;br&gt;
was made in response to something that would otherwise be silent. That's a&lt;br&gt;
different mode of thinking than building something that does a visible thing,&lt;br&gt;
and it's the mode I want to be good at.&lt;/p&gt;

&lt;p&gt;The other thing it was worth: it's the project that taught me that "reliability"&lt;br&gt;
is not an adjective. It's a set of specific design decisions — store first, retry&lt;br&gt;
with backoff, deduplicate, verify signatures with constant-time comparison — each&lt;br&gt;
of which exists because someone, somewhere, lost money that didn't announce&lt;br&gt;
itself. Building the service is how I learned what those decisions are for.&lt;/p&gt;




&lt;h2&gt;
  
  
  If you're building one
&lt;/h2&gt;

&lt;p&gt;Four things I'd tell anyone building their first webhook receiver:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Store the webhook before doing anything with it.&lt;/strong&gt; The processing can fail.&lt;br&gt;
The storage shouldn't. Once the raw webhook is in a durable store, you can retry&lt;br&gt;
processing as many times as you want without losing the original message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Return 200 immediately, then process in a worker.&lt;/strong&gt; The provider doesn't&lt;br&gt;
care whether your processing succeeded — they care whether you &lt;em&gt;received&lt;/em&gt; the&lt;br&gt;
webhook. Returning 200 tells them "I got it, stop retrying." Processing can take&lt;br&gt;
as long as it needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Use constant-time comparison for signature verification.&lt;/strong&gt; &lt;code&gt;hmac.compare_digest()&lt;/code&gt;, not &lt;code&gt;==&lt;/code&gt;. The difference is invisible in testing and material in security.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Test the property, not the implementation.&lt;/strong&gt; Tests that measure milliseconds fail on slow CI. Tests that check "the function returns the correct boolean for every input shape" work anywhere. Test what the code guarantees, not what it happens to do on your laptop.&lt;/p&gt;




&lt;h2&gt;
  
  
  The link
&lt;/h2&gt;

&lt;p&gt;Webhook Relay is at&lt;br&gt;
&lt;a href="https://github.com/Agenda-X-PR/webhook-relay" rel="noopener noreferrer"&gt;github.com/Agenda-X-PR/webhook-relay&lt;/a&gt;,&lt;br&gt;
with a live demo at&lt;br&gt;
&lt;a href="https://webhook-relay-xxvu.onrender.com/docs" rel="noopener noreferrer"&gt;webhook-relay-xxvu.onrender.com/docs&lt;/a&gt;.&lt;br&gt;
MIT licensed, 28 tests, CI on Python 3.11–3.13.&lt;/p&gt;

&lt;p&gt;If you're building a payment integration, the README is the actual guide. The&lt;br&gt;
article is the story of how the guide came to exist. Read whichever one is more&lt;br&gt;
useful to you.&lt;/p&gt;

&lt;p&gt;This is the third piece in a series about the projects I've shipped. The first&lt;br&gt;
was &lt;a href="https://dev.tolink-to-blog-1"&gt;why Excel fails at payment reconciliation&lt;/a&gt;. The second was&lt;br&gt;
&lt;a href="https://dev.tolink-to-blog-2"&gt;reconciling a Paystack export against a bank statement&lt;/a&gt;. The&lt;br&gt;
fourth will be about &lt;a href="https://dev.toLINK-TBD"&gt;the payments detection platform&lt;/a&gt;, when I get to&lt;br&gt;
it.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>automation</category>
      <category>discuss</category>
      <category>learning</category>
    </item>
    <item>
      <title>I Built an SDK Because I Was Desperate</title>
      <dc:creator>Xayen Universe</dc:creator>
      <pubDate>Tue, 03 Nov 2026 19:41:27 +0000</pubDate>
      <link>https://dev.to/xayenuniverse/i-built-an-sdk-because-i-was-desperate-5flb</link>
      <guid>https://dev.to/xayenuniverse/i-built-an-sdk-because-i-was-desperate-5flb</guid>
      <description>&lt;p&gt;This is not a story about a great idea I had in the shower. It's a story about&lt;br&gt;
being hungry, tired, and slightly greedy, and deciding that the fastest path out&lt;br&gt;
of that was to build something for a bank.&lt;/p&gt;

&lt;p&gt;I'm writing it down because most "how I built X" posts skip the embarrassing&lt;br&gt;
part. They start with "I noticed a gap in the market" and end with "and then it&lt;br&gt;
was a huge success." That's not what happened here. What happened is: I was&lt;br&gt;
desperate, I built an SDK, it mostly broke, I fixed it, and then I wrote about&lt;br&gt;
it because that's how I process things.&lt;/p&gt;

&lt;p&gt;Here's the honest version.&lt;/p&gt;




&lt;h2&gt;
  
  
  The foolish idea
&lt;/h2&gt;

&lt;p&gt;I'd been looking at ALATPay's developer documentation for a different reason —&lt;br&gt;
I wanted to integrate their payment gateway into something I was building. The&lt;br&gt;
docs were fine. The JavaScript SDK was fine. But there was no Java SDK.&lt;/p&gt;

&lt;p&gt;My first thought was the wrong one, and I want to be specific about why it was&lt;br&gt;
wrong.&lt;/p&gt;

&lt;p&gt;I thought: &lt;strong&gt;"If I build the Java SDK, maybe they'll pay me."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not "maybe they'll hire me." Not "maybe it'll be a good portfolio piece." I&lt;br&gt;
genuinely thought a bank would notice a random developer's unrequested&lt;br&gt;
open-source project and decide to compensate them for it. That is not how banks&lt;br&gt;
work. I knew that at the time, in the abstract. I chose not to know it in the&lt;br&gt;
specific, because I was hungry and tired and looking for something to be true&lt;br&gt;
that wasn't.&lt;/p&gt;

&lt;p&gt;The SDK took five days to build. The compensation has, so far, been zero&lt;br&gt;
naira. The portfolio piece has, so far, been worth more than I expected.&lt;/p&gt;

&lt;p&gt;If you're reading this because you're thinking about building something for a&lt;br&gt;
company hoping they'll pay you for it: &lt;strong&gt;don't do that.&lt;/strong&gt; Build it because you&lt;br&gt;
need it, or because it's a portfolio piece, or because you want to learn the&lt;br&gt;
API. But don't build it for the money. The money is not coming.&lt;/p&gt;




&lt;h2&gt;
  
  
  What "everything broke" actually means
&lt;/h2&gt;

&lt;p&gt;I want to describe this carefully because "everything broke" is what I told&lt;br&gt;
a friend at the time, and it's accurate but not useful.&lt;/p&gt;

&lt;p&gt;What actually happened is: &lt;strong&gt;everything broke at a specific moment, and then&lt;br&gt;
one thing at a time after that.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first version didn't work at all. The authentication was wrong. ALATPay&lt;br&gt;
uses three headers — &lt;code&gt;Authorization&lt;/code&gt;, &lt;code&gt;Business-Id&lt;/code&gt;, and&lt;br&gt;
&lt;code&gt;Ocp-Apim-Subscription-Key&lt;/code&gt; — and I was sending two of them. The third one&lt;br&gt;
(&lt;code&gt;Ocp-Apim-Subscription-Key&lt;/code&gt;) is an Azure API Management convention that I&lt;br&gt;
hadn't encountered before. I sent it under the wrong name, or not at all,&lt;br&gt;
depending on the hour of the night.&lt;/p&gt;

&lt;p&gt;I got 401s for a full day. Every 401 response told me the same thing — "invalid&lt;br&gt;
subscription key" — and every time I read it, I thought "that can't be right, I&lt;br&gt;
put the key in." I read it as a bug in their system, not a bug in my code. It&lt;br&gt;
was a bug in my code.&lt;/p&gt;

&lt;p&gt;The second version authenticated correctly but couldn't parse the response. The&lt;br&gt;
list of transactions in ALATPay's response has more fields than I'd modelled.&lt;br&gt;
My Jackson classes were missing &lt;code&gt;feeAmount&lt;/code&gt; and &lt;code&gt;settlementId&lt;/code&gt; and a dozen other&lt;br&gt;
things. Jackson doesn't crash when it sees unknown fields by default — it&lt;br&gt;
ignores them — but it does crash when it sees a field it &lt;em&gt;thinks&lt;/em&gt; it knows, with&lt;br&gt;
a type that doesn't match. Which was happening, because I'd guessed at the&lt;br&gt;
types.&lt;/p&gt;

&lt;p&gt;The third version worked. Then the tests failed.&lt;/p&gt;

&lt;p&gt;This is the part that took longest, and it's the part I want to talk about&lt;br&gt;
because it's not in any tutorial.&lt;/p&gt;




&lt;h2&gt;
  
  
  The test problem nobody warns you about
&lt;/h2&gt;

&lt;p&gt;When you're building an SDK, you can't test it against the real API. Not&lt;br&gt;
comfortably. Every test call costs you a real request against a real merchant&lt;br&gt;
account, and if you're testing in production you're going to trip rate limits&lt;br&gt;
and log a lot of nonsense in someone's audit trail.&lt;/p&gt;

&lt;p&gt;So you use a fake server. In Java, that's usually &lt;code&gt;MockWebServer&lt;/code&gt; — it spins up&lt;br&gt;
a local HTTP server that you can tell to respond with whatever you want.&lt;/p&gt;

&lt;p&gt;The problem I hit is that &lt;strong&gt;MockWebServer is a different server from ALATPay.&lt;/strong&gt;&lt;br&gt;
It doesn't authenticate, it doesn't rate-limit, it doesn't have a schema. You&lt;br&gt;
tell it what to respond, and it responds. That's the whole point. But it means&lt;br&gt;
that a test that passes against MockWebServer can still fail against ALATPay,&lt;br&gt;
because the test is verifying my &lt;em&gt;assumptions&lt;/em&gt; about ALATPay, not ALATPay.&lt;/p&gt;

&lt;p&gt;The first test I wrote checked that my SDK could fetch a list of transactions.&lt;br&gt;
It passed. Then I ran the same code against the real API and got a 404. My test&lt;br&gt;
had been testing whether Jackson could parse a JSON string I'd written, not&lt;br&gt;
whether my SDK could talk to a real server. Which is a real thing to test, but&lt;br&gt;
it's not the thing I thought I was testing.&lt;/p&gt;

&lt;p&gt;The fix was to be honest about what the tests verify. The README now says:&lt;br&gt;
&lt;em&gt;"All tests use MockWebServer — no real API credentials required to run them."&lt;/em&gt;&lt;br&gt;
Which is true. It's not the same as "the SDK works against ALATPay" and I&lt;br&gt;
learned not to imply that it was.&lt;/p&gt;




&lt;h2&gt;
  
  
  The five days between "shipped" and "actually shipped"
&lt;/h2&gt;

&lt;p&gt;The commit history tells this part better than I can.&lt;/p&gt;

&lt;p&gt;My initial commit was on October 11th. Then, five days later, on October 16th,&lt;br&gt;
the last commit message is: &lt;em&gt;"URL-encode user input in query and path&lt;br&gt;
segments."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That's the whole story of the intermediate five days. I shipped. I told myself&lt;br&gt;
it was done. Then I kept finding things.&lt;/p&gt;

&lt;p&gt;The URL-encoding thing is a good example because it's the kind of bug that&lt;br&gt;
doesn't show up in testing. If you pass a transaction ID with a space in it —&lt;br&gt;
or a slash, or an ampersand — the URL is malformed and the server returns&lt;br&gt;
nonsense. My tests used IDs that were safe. Real transaction IDs are not always&lt;br&gt;
safe. Five days later I noticed and fixed it.&lt;/p&gt;

&lt;p&gt;There's a version of this story where I say "I shipped the SDK in one weekend,&lt;br&gt;
here's the link." That version is true in the sense that the repo existed after&lt;br&gt;
the weekend. It's not true in the sense that the SDK was finished, because the&lt;br&gt;
SDK wasn't finished. It was &lt;em&gt;started&lt;/em&gt;, and it kept being started for five more&lt;br&gt;
days.&lt;/p&gt;

&lt;p&gt;I think the "shipped in a weekend" framing is a lie that hurts the people who&lt;br&gt;
read it. It makes them feel bad about the fact that their project is still&lt;br&gt;
breaking after a week. Their project is supposed to be still breaking after a&lt;br&gt;
week. Yours was too.&lt;/p&gt;




&lt;h2&gt;
  
  
  What the SDK actually doesn't do
&lt;/h2&gt;

&lt;p&gt;The README is honest about this, and I want to be honest about it here too:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bank transfer is stubbed.&lt;/strong&gt; The endpoint for generating virtual accounts&lt;br&gt;
isn't in the public API documentation, so my &lt;code&gt;BankTransferService&lt;/code&gt; throws&lt;br&gt;
&lt;code&gt;UnsupportedOperationException&lt;/code&gt; and tells you to check the docs. It's a&lt;br&gt;
placeholder. It doesn't work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;USSD and static wallets are "planned."&lt;/strong&gt; Planned means not built. I have&lt;br&gt;
notes on what they'd look like. I haven't written them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The SDK isn't on Maven Central.&lt;/strong&gt; You can't add it as a dependency yet. You&lt;br&gt;
have to clone it and build it locally. That's a real friction point, and I&lt;br&gt;
haven't paid the cost of getting a publishing account set up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You need your own credentials.&lt;/strong&gt; The SDK doesn't come with test keys, and it&lt;br&gt;
doesn't have a demo mode. To run it against anything, you need a merchant&lt;br&gt;
account with ALATPay, three credentials from their dashboard, and the patience&lt;br&gt;
to get them. Without those, the SDK is a very well-documented way to throw&lt;br&gt;
&lt;code&gt;AlatPayAuthException&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That last point is the one that limits the SDK most in practice, and it's the&lt;br&gt;
one I'd change first if I were doing it again. A version of this with a&lt;br&gt;
sandbox credential flow — or with a mock mode that returns fixture data without&lt;br&gt;
touching the network — would be more useful than the version I shipped.&lt;/p&gt;

&lt;p&gt;I didn't build that because I didn't know how to. That's the honest reason.&lt;br&gt;
Not "I chose not to because of scope." I didn't know how.&lt;/p&gt;




&lt;h2&gt;
  
  
  What it was actually worth
&lt;/h2&gt;

&lt;p&gt;The SDK has, at this point, been read by fewer than a hundred people. It has,&lt;br&gt;
as far as I know, zero users. Nobody has opened a pull request. Nobody has sent&lt;br&gt;
me an issue.&lt;/p&gt;

&lt;p&gt;By the metrics that matter to a venture capitalist, it's a failure.&lt;/p&gt;

&lt;p&gt;By the metrics that matter to me, it's not, because of three things that&lt;br&gt;
happened after I built it:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I learned what an SDK actually is.&lt;/strong&gt; Not "a wrapper around an API" in the&lt;br&gt;
abstract, but the specific mechanics: a client object, a config object, typed&lt;br&gt;
exceptions, a shared HTTP layer, tests that mock the server. I can read any&lt;br&gt;
other SDK now and understand what it's doing, because I built one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I learned how banks think about security.&lt;/strong&gt; The three-header scheme on&lt;br&gt;
ALATPay isn't decorative. It's a specific model of what can go wrong and who's&lt;br&gt;
responsible for what. Building a client for it meant I had to understand it,&lt;br&gt;
and understanding it taught me more about payments infrastructure than reading&lt;br&gt;
a blog post would have.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I got a piece of code I can point at.&lt;/strong&gt; When I talk to people about what I&lt;br&gt;
do now — when I say I build SDKs — I have a URL. That URL is a thing I made,&lt;br&gt;
and it exists, and it has tests, and it has a license, and somebody can clone&lt;br&gt;
it and run it. That's worth more than the compensation I was imagining when I&lt;br&gt;
started.&lt;/p&gt;

&lt;p&gt;The compensation did not arrive. The thing I actually got was better.&lt;/p&gt;




&lt;h2&gt;
  
  
  If you're going to build one anyway
&lt;/h2&gt;

&lt;p&gt;Build it for yourself, or for the portfolio, or because you want to learn the&lt;br&gt;
API. Not because you're hoping a company will notice.&lt;/p&gt;

&lt;p&gt;Here are the four things I'd tell anyone building their first SDK:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Get the auth headers right on day one.&lt;/strong&gt; Before you build anything else,&lt;br&gt;
build a single request that authenticates correctly. If the API has three&lt;br&gt;
headers, test all three before you write the client. The 401 loop I spent a&lt;br&gt;
day in is the most avoidable part of this entire story.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Model the response types conservatively.&lt;/strong&gt; Use &lt;code&gt;@JsonIgnoreProperties(ignoreUnknown = true)&lt;/code&gt; on every response class. Don't guess at field types. Test against a real response before you decide a field is a &lt;code&gt;long&lt;/code&gt; instead of a &lt;code&gt;String&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Be honest about what your tests test.&lt;/strong&gt; MockWebServer is for verifying your own logic, not the remote server. Say that in the README.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Ship it before it's done, and then keep shipping it.&lt;/strong&gt; The five-day gap between my first commit and my last is the realistic version. Nobody builds a working SDK in a weekend. If you tell yourself you have to, you'll never start.&lt;/p&gt;




&lt;h2&gt;
  
  
  The link
&lt;/h2&gt;

&lt;p&gt;The SDK is at&lt;br&gt;
&lt;a href="https://github.com/Agenda-X-PR/alatpay-java-sdk" rel="noopener noreferrer"&gt;github.com/Agenda-X-PR/alatpay-java-sdk&lt;/a&gt;.&lt;br&gt;
It's MIT licensed. It works for transaction listing, single transaction&lt;br&gt;
lookup, and settlements. It doesn't work for bank transfers yet, because ALATPay&lt;br&gt;
hasn't published the endpoint, and I'm not going to pretend I can guess at it.&lt;/p&gt;

&lt;p&gt;If you're a Java developer integrating ALATPay, use it. If it saves you the&lt;br&gt;
401 loop I spent a day in, it's done its job.&lt;/p&gt;

&lt;p&gt;If you're a developer thinking about building something for a company hoping&lt;br&gt;
they'll pay you — read the first section of this post again, and then don't&lt;br&gt;
do that.&lt;/p&gt;

</description>
      <category>networking</category>
      <category>beginners</category>
      <category>devops</category>
      <category>opensource</category>
    </item>
    <item>
      <title>The Reconciliation Tool I Almost Didn't Finish</title>
      <dc:creator>Xayen Universe</dc:creator>
      <pubDate>Tue, 03 Nov 2026 18:44:39 +0000</pubDate>
      <link>https://dev.to/xayenuniverse/the-reconciliation-tool-i-almost-didnt-finish-5a5i</link>
      <guid>https://dev.to/xayenuniverse/the-reconciliation-tool-i-almost-didnt-finish-5a5i</guid>
      <description>&lt;p&gt;I want to tell you about the night I decided to build this. It wasn't when I&lt;br&gt;
sat down to write code — it was three hours into an Excel reconciliation for a&lt;br&gt;
client, at 11pm, when I noticed the sum of a column was off by ₦0.02 and spent&lt;br&gt;
45 minutes finding out why.&lt;/p&gt;

&lt;p&gt;The answer: floating-point arithmetic. Excel was storing ₦5,000.00 as&lt;br&gt;
&lt;code&gt;5000.0000000000003&lt;/code&gt; because of the way it handles decimals, and my VLOOKUP was&lt;br&gt;
failing because the two sides of the match had slightly different underlying&lt;br&gt;
values. The ₦0.02 wasn't real money. It was the way Excel represented the&lt;br&gt;
money.&lt;/p&gt;

&lt;p&gt;I closed the spreadsheet, opened a blank Python file, and wrote:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;decimal&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Decimal&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That was the first line of &lt;code&gt;reconcile&lt;/code&gt;. It's been the most important line I&lt;br&gt;
wrote all week.&lt;/p&gt;




&lt;h2&gt;
  
  
  The first decision I made, and why it stuck
&lt;/h2&gt;

&lt;p&gt;I knew within five minutes of starting that the tool needed &lt;code&gt;Decimal&lt;/code&gt;, not&lt;br&gt;
&lt;code&gt;float&lt;/code&gt;. Not because I'm disciplined about types — I'm not. But because I'd just&lt;br&gt;
spent 45 minutes of my life on a bug that existed only because float arithmetic&lt;br&gt;
rounds in ways a spreadsheet hides.&lt;/p&gt;

&lt;p&gt;Money in &lt;code&gt;float&lt;/code&gt; is a lie. &lt;code&gt;0.1 + 0.2 = 0.30000000000000004&lt;/code&gt; in float math. For&lt;br&gt;
a chart, that doesn't matter. For reconciliation, it's the entire bug class I&lt;br&gt;
was trying to escape. &lt;code&gt;Decimal&lt;/code&gt; doesn't have the problem. &lt;code&gt;Decimal&lt;/code&gt; stores&lt;br&gt;
5000.00 as exactly 5000.00.&lt;/p&gt;

&lt;p&gt;I made that decision in the first five minutes and never reconsidered it. That's&lt;br&gt;
rare for me. Normally I'd write the code with &lt;code&gt;float&lt;/code&gt;, hit the bug, and rewrite.&lt;br&gt;
This time I'd already hit the bug — in Excel, at 11pm — and I knew what the fix&lt;br&gt;
was going to look like.&lt;/p&gt;

&lt;p&gt;The lesson I didn't fully articulate at the time: the first decision sets the&lt;br&gt;
tone for the whole project. Getting the type right on Day 1 meant I never had a&lt;br&gt;
rounding bug on Days 2, 3, 4, or 5. The bug was pre-empted, not debugged.&lt;/p&gt;




&lt;h2&gt;
  
  
  The second decision: three sections, not one number
&lt;/h2&gt;

&lt;p&gt;My first instinct for the report was a single line: "N transactions matched, M&lt;br&gt;
didn't." That would be easier to write. It would also be useless.&lt;/p&gt;

&lt;p&gt;The question I wanted the tool to answer wasn't "did everything match" — it was&lt;br&gt;
"what didn't match, and what should I do about it?" A count of 47 matches&lt;br&gt;
doesn't tell you the three things that need fixing.&lt;/p&gt;

&lt;p&gt;So the report became three sections. &lt;strong&gt;Matched&lt;/strong&gt; so you can verify the good&lt;br&gt;
ones. &lt;strong&gt;Unmatched processor rows&lt;/strong&gt; — the transactions the processor says&lt;br&gt;
succeeded but that aren't in the bank. Those are the ones you chase. &lt;strong&gt;Unmatched&lt;br&gt;
bank rows&lt;/strong&gt; — bank entries with no matching processor transaction. Those are the&lt;br&gt;
ones you investigate. Are they refunds? Chargebacks? A different client paying&lt;br&gt;
into the same account?&lt;/p&gt;

&lt;p&gt;That decision added about 30 lines of output-formatting code on Day 2. Worth&lt;br&gt;
every line.&lt;/p&gt;

&lt;p&gt;The instinct I had to resist was "make it as simple as possible." A&lt;br&gt;
single-number report would have been simpler to build and harder to use. The&lt;br&gt;
simplest thing the &lt;em&gt;user&lt;/em&gt; needs is not the simplest thing the &lt;em&gt;code&lt;/em&gt; can produce.&lt;/p&gt;




&lt;h2&gt;
  
  
  The first thing that went wrong
&lt;/h2&gt;

&lt;p&gt;On Day 2, I wrote the matcher. The exact-match version. The one that compares&lt;br&gt;
&lt;code&gt;reference&lt;/code&gt; column to &lt;code&gt;reference&lt;/code&gt; column, amount column to amount column.&lt;/p&gt;

&lt;p&gt;I ran it on the fixtures and got zero matches. All rows unmatched on both&lt;br&gt;
sides.&lt;/p&gt;

&lt;p&gt;The reason: the processor's reference is &lt;code&gt;ORD-001&lt;/code&gt;. The bank's description is&lt;br&gt;
&lt;code&gt;TRF/ORD-001/PAYSTACK&lt;/code&gt;. Different formats. The column I thought I was comparing&lt;br&gt;
was actually a free-text description that &lt;em&gt;contained&lt;/em&gt; the reference somewhere&lt;br&gt;
inside it.&lt;/p&gt;

&lt;p&gt;This is the kind of bug that doesn't show up in a mental model. I &lt;em&gt;knew&lt;/em&gt;&lt;br&gt;
references wouldn't be exact matches — that's why I'd built in fuzzy matching&lt;br&gt;
for Day 3. But I wrote the exact-match version first anyway, because Day 2's job&lt;br&gt;
was the simplest possible thing. Simplest possible thing, it turned out, matched&lt;br&gt;
zero rows.&lt;/p&gt;

&lt;p&gt;The fix was a regex on Day 3. &lt;code&gt;[A-Z]+-\d+&lt;/code&gt;, extract &lt;code&gt;ORD-001&lt;/code&gt; from&lt;br&gt;
&lt;code&gt;TRF/ORD-001/PAYSTACK&lt;/code&gt;, case-insensitive comparison. Ten lines of code.&lt;/p&gt;

&lt;p&gt;Should this have been on Day 2? Probably. I could have designed the fixture&lt;br&gt;
files to have exact-matching references and saved normalization for Day 3. But&lt;br&gt;
the fixtures I picked reflected what real bank statements actually look like,&lt;br&gt;
and the real problem was always going to need extraction.&lt;/p&gt;

&lt;p&gt;The bug you find on Day 2 is often the bug you should have designed for on Day&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;That's not a failure. That's what the process looks like.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The thing I almost shipped but didn't
&lt;/h2&gt;

&lt;p&gt;There was a moment on Day 3, after the fuzzy matching worked, where I thought:&lt;br&gt;
"Let me add a &lt;code&gt;--verbose&lt;/code&gt; flag to the CLI." The output was one line per match,&lt;br&gt;
and I wanted a flag that showed more detail for each row.&lt;/p&gt;

&lt;p&gt;I sat with it for five minutes and killed it.&lt;/p&gt;

&lt;p&gt;The reason: the output already showed everything. Adding &lt;code&gt;--verbose&lt;/code&gt; would let&lt;br&gt;
the user &lt;em&gt;choose&lt;/em&gt; to see less. But the tool's entire purpose was showing the&lt;br&gt;
full picture. A user who runs &lt;code&gt;reconcile&lt;/code&gt; wants to see the three sections. A&lt;br&gt;
user who wants one line of output wants a different tool.&lt;/p&gt;

&lt;p&gt;This is the difference between "a feature I could add" and "a feature the&lt;br&gt;
product needs." I default to adding. This time I didn't.&lt;/p&gt;

&lt;p&gt;The rule I'd carry forward: if you're adding a flag to hide what's already&lt;br&gt;
there, you're probably building a different tool than the one you set out to&lt;br&gt;
build.&lt;/p&gt;




&lt;h2&gt;
  
  
  The 5-day build, honestly
&lt;/h2&gt;

&lt;p&gt;Here's what actually happened, not the polished version.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 1 (2 hours):&lt;/strong&gt; models.py, cli.py, print row counts. The CLI reported "4&lt;br&gt;
processor rows, 3 bank rows" and I closed the laptop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 2 (3 hours):&lt;/strong&gt; matcher.py with exact match, two tests. Got zero matches&lt;br&gt;
first, realized the reference-extraction problem, added a regex that probably&lt;br&gt;
belonged on Day 3. Tests passed eventually. Went to sleep at 1am.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 3 (3 hours):&lt;/strong&gt; fuzzy matching — amount tolerance, date window,&lt;br&gt;
case-insensitive reference — plus 7 more tests. 9 tests total. Felt like the&lt;br&gt;
hard part was done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 4 (1.5 hours):&lt;/strong&gt; README, LICENSE, CI, push. Most of this day was&lt;br&gt;
writing, not coding. Also spent 30 minutes fighting a Python PATH issue when&lt;br&gt;
&lt;code&gt;reconcile.exe&lt;/code&gt; wasn't found. The fix was &lt;code&gt;python -m reconcile&lt;/code&gt; instead of&lt;br&gt;
&lt;code&gt;reconcile&lt;/code&gt;. Six minutes of work, 30 minutes of not realizing it was six&lt;br&gt;
minutes of work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 5 (2.5 hours):&lt;/strong&gt; reconcile-demo. FastAPI wrapper, HTML form, Render&lt;br&gt;
deploy. First deploy failed. Second deploy worked. Total: 12 hours, five&lt;br&gt;
calendar days, most of it in 2-hour sessions.&lt;/p&gt;

&lt;p&gt;The honest part: every single day had a "this isn't working" moment. Day 2's&lt;br&gt;
was the zero-match. Day 3's was a test failing because the date math was off by&lt;br&gt;
one day — weekends don't post the same way weekdays do, and I hadn't thought&lt;br&gt;
about that. Day 4's was the PATH issue. Day 5's was &lt;code&gt;ModuleNotFoundError&lt;/code&gt; for&lt;br&gt;
the &lt;code&gt;reconcile&lt;/code&gt; package because the temp files were being read incorrectly.&lt;/p&gt;

&lt;p&gt;Every day, something didn't work on the first try.&lt;/p&gt;

&lt;p&gt;The reason I finished anyway: each of those moments was a specific error message&lt;br&gt;
pointing at a specific line. None of them were "I don't know where to start."&lt;br&gt;
They were all "this one thing is wrong." And each one was fixable in under 20&lt;br&gt;
minutes once I stopped trying variations of the same command and actually read&lt;br&gt;
what the error was saying.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's still not done, and why
&lt;/h2&gt;

&lt;p&gt;Things I deliberately cut because they weren't part of the finish line:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No support for Xero or QuickBooks exports.&lt;/strong&gt; Only the two CSV formats in the
README.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No CLI flags for tolerances.&lt;/strong&gt; Change &lt;code&gt;FuzzyMatchConfig&lt;/code&gt; in code if you need
different tolerances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No JSON output.&lt;/strong&gt; Text only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No CI test for the &lt;code&gt;pip install&lt;/code&gt;ed command.&lt;/strong&gt; Works locally; not tested on
CI.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No partial refunds, chargebacks, or multi-currency settlement.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each one is in the README's "Limitations" section. The point of that section&lt;br&gt;
isn't to apologize — it's to make the boundary visible. Anyone using the tool&lt;br&gt;
knows exactly what it does and doesn't do.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I'd do differently
&lt;/h2&gt;

&lt;p&gt;One thing. I'd write the fixture files &lt;em&gt;before&lt;/em&gt; the matcher.&lt;/p&gt;

&lt;p&gt;I wrote &lt;code&gt;models.py&lt;/code&gt; first, then the matcher, then the fixtures. Then on Day 2 I&lt;br&gt;
discovered the fixtures needed a specific format the matcher didn't expect. If&lt;br&gt;
the fixtures had come first, they'd have shown me the reference-extraction&lt;br&gt;
problem before I wrote code that assumed it away. The matcher would have been&lt;br&gt;
written correctly on the first try.&lt;/p&gt;

&lt;p&gt;The rule I'll carry forward: write the test data before the code that uses it.&lt;br&gt;
The data tells you what the code needs to handle, and it's cheaper to change the&lt;br&gt;
data than to change the code.&lt;/p&gt;




&lt;h2&gt;
  
  
  If you're doing this in Excel right now
&lt;/h2&gt;

&lt;p&gt;Everything above is about a specific 12-hour project. The part that matters to&lt;br&gt;
you is whether Excel is the right tool for your situation.&lt;/p&gt;

&lt;p&gt;The honest answer: &lt;strong&gt;for fewer than 20 transactions a month with fewer than 3&lt;br&gt;
clients, Excel is fine.&lt;/strong&gt; The manual process takes 20 minutes and the&lt;br&gt;
discrepancies are rare enough that a tool is not the bottleneck.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For 20+ transactions a month with 3+ clients, no bookkeeper, and no&lt;br&gt;
spreadsheet discipline — Excel is losing money for you.&lt;/strong&gt; Not visibly. Not in a&lt;br&gt;
way you can point to a line and say "that's what Excel cost me." But every&lt;br&gt;
₦15,000 missed payment that goes uncaught is real, and the same missed payment&lt;br&gt;
every month for a year is ₦180,000 that went to a bank's reconciliation queue and&lt;br&gt;
never came back.&lt;/p&gt;

&lt;p&gt;You can &lt;a href="https://reconcile-demo.onrender.com/" rel="noopener noreferrer"&gt;try the tool in the browser&lt;/a&gt;&lt;br&gt;
without installing anything. Upload any two CSVs and see what it does. If it&lt;br&gt;
doesn't help, you've lost nothing. If it does, the source is at&lt;br&gt;
&lt;a href="https://github.com/Agenda-X-PR/reconcile" rel="noopener noreferrer"&gt;github.com/Agenda-X-PR/reconcile&lt;/a&gt;&lt;br&gt;
and you can run it locally.&lt;/p&gt;

&lt;p&gt;Either way, you now know why your Excel is lying to you.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>python</category>
      <category>opensource</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
