This Arena brief asks builders to reconcile POS terminal settlements against shop sales nightly with n8n for a busy Abuja supermarket. Every card sale should be matched to what the bank actually settled, every gap flagged by morning, and the finance lead should only ever look at exceptions instead of spending two hours a night on spreadsheets.
The business behind the brief
The brief's business, Capital Mart Abuja, is an Arena scenario: a supermarket in Wuse II with six POS terminals across two tills and two entrances, processing about 1,200 card transactions a day and roughly ₦45 million in card sales a month. Settlements arrive through acquirer callbacks and daily CSV pulls from the POS provider.
The finance lead spends 90 to 120 minutes every night comparing settlement files with the sales ledger. Even so, the store cannot quickly explain ₦300,000 to ₦900,000 a month lost to failed settlements, duplicate captures and partial settlements. Late discovery hurts twice: the money is harder to recover, and supplier payments slip because cash flow is wrong.
What the automation has to do
Reconciliation sounds like one job but is really four, and the brief's rubric grades them separately:
- Fetch each terminal's settlements every night, surviving an API that fails.
- Store the raw payloads once, even if the same file is pulled twice.
- Match settlement items to sales and give every sale a status: matched, missing settlement, partial amount, or an extra settlement nobody sold.
- Report exceptions to a sheet and a WhatsApp summary, with an audit trail of the run.
How to approach the build
- Run after the banks are done. A
Schedule Triggerat 02:15 Lagos time gives settlement windows time to close. Create a run ID at the start and attach it to every record the run writes, so one night's work can be traced end to end. - Loop over terminals one at a time. Keep the six terminals in a list and process them with the
Loop Over Itemsnode. One at a time is slower, but it avoids rate limits and means one broken terminal does not take the others down with it. - Branch on fetch success. After each
HTTP Request, check the status and the shape of the response. A 200 with no items array is still a failure. Success continues; failure records the error and the retry count on the raw row. - Hash the settlement payload. Compute a SHA256 of the terminal ID plus the batch ID, or the serialised payload, and upsert it into
pos_settlements_raw. Tomorrow's run will skip a file it has already stored. - Normalise items, then match. Split each payload into settlement items, then match them to sales by transaction ID and amount. Matching by ID with an amount check is what separates "partial" from "matched".
- Retry through an error workflow. Failed pulls go to an error workflow that retries up to three times with growing waits, then alerts finance on WhatsApp if the terminal still fails.
The hard parts
Four statuses, not two
Beginners build matched versus unmatched. The brief asks for more because finance treats each case differently. A missing settlement is money the acquirer owes. A partial amount is a dispute. An extra settlement, one with no matching sale, is either a duplicate capture or a sale that never reached the ledger, and both need investigating. Name them precisely and finance knows what to do with each one.
Exponential backoff
Retrying a failing API immediately usually fails again. Waiting longer each time, for example 1, then 2, then 4 minutes, gives a struggling endpoint room to recover. Store retry_count and last_retry_at on the raw row so the retry state survives between executions and a human can see what happened.
Idempotent item inserts
If a run dies halfway through, the next run must not insert the same settlement items twice. Give each item a natural key, terminal plus settlement transaction ID, and use upserts with a unique constraint. Then a re-run is always safe, which is exactly what you want at 2am when nobody is watching.
What our graders look for
- Nightly structure and orchestration (25%): the schedule, run metadata, terminal loop and fetch branching are clear on the canvas.
- Raw ingestion and settlement_hash dedupe (20%): pulling the same file twice stores it once.
- Normalisation and reconciliation logic (25%): every sale ends in one of the four statuses, with the discrepancy in naira.
- Retry behaviour (20%): the test endpoint that fails once then succeeds is recovered automatically, and a permanently failing one alerts finance.
- Run-level audit and notifications (10%): the audit log, exception sheet and nightly WhatsApp summary.
Every criterion answers a question a finance lead would ask: can I trust it, will it run without me, and will it tell me when it cannot?
Pricing and pitching this job
The brief values this at USD 800 to 2,000 for setup plus a monthly retainer. The pitch writes itself from the client's own numbers: two hours a night of a finance lead's time, and up to ₦900,000 a month that cannot be explained. If the reconciler recovers even part of that, it pays for itself quickly. Demonstrate it with the brief's test cases: a clean file, a missing transaction, a partial amount, a failing endpoint and a duplicate payload, all resolved in one run.
New Arena briefs drop every Monday in the app at app.automatenaija.com, and every Beginner brief is free, so pick one and build it this week.
Frequently asked questions
What is POS settlement reconciliation?
It is checking that the money your bank actually settled for card payments matches the sales your till recorded. Each terminal settles in batches, and some transactions fail, settle twice or settle for less. Reconciliation matches settlements to sales by transaction ID and amount, so every gap is found while it can still be disputed with the acquirer.
Why run the reconciliation at night?
Banks and acquirers settle card payments in windows, usually after the trading day ends. Running at about 2am Lagos time means the day's settlements are available, the store is closed, and the finance team finds a finished exception report waiting for them in the morning instead of starting the job themselves.
How do I retry a failed API call in n8n?
For simple cases, turn on Retry On Fail in the node settings. For anything that must survive between runs, record the failure and a retry count in your database, and let an error workflow or a scheduled retry pass wait longer each time before trying again. After a set number of attempts, stop and alert a person instead of retrying forever.
Can this work with Google Sheets instead of Supabase?
For a small shop, yes, but at 1,200 transactions a day Sheets becomes slow and has no unique constraints to stop duplicate inserts. A database such as Supabase enforces uniqueness for you, which is what makes nightly re-runs safe. Many builds keep Sheets only for the exception list that finance reviews.
Build it with us. The community is free and the build track teaches this kind of automation week by week: see pricing or join the community.
Loading comments...