Skip to main content
Version: Current

Bank webhooks and operational monitoring

A bank webhook provider defines how Makronexus receives and normalizes server-to-server messages from a bank, mobile-money service or payment gateway. A webhook event records one received provider message, its event type, processing status, external reference, financial fields, matching fields, raw payload, normalized data, error detail and processing timestamps.

Webhook operations are integration evidence. A completed webhook does not by itself prove that a Payment was saved, allocated, receipted, posted, reconciled or settled. Provider configuration and operational event monitoring must therefore be linked to the P4 Payment lifecycle and P6 reconciliation controls.

Audience: payment operations staff, finance administrators, implementers, support analysts, security teams, accountants and auditors
Learning time: 55 minutes
Navigation: Finance → Bank webhooks (finance/bank-webhooks)
Control objective: receive provider events securely, process them idempotently, identify duplicates/failures quickly and retain enough evidence to reproduce every financial effect.

Learning outcomes

You will be able to:

  • distinguish provider configuration from event evidence;
  • explain the verified provider and event types;
  • identify exact webhook permissions and current frontend-gate caveats;
  • protect HMAC/API secrets and callback configuration;
  • interpret received, processing, completed, failed, duplicate and ignored events;
  • trace a webhook to a Payment Attempt, Payment and reconciliation item;
  • investigate duplicate, failed and unmatched events;
  • define daily monitoring and escalation routines;
  • prove that autoReconcile is configuration, not proof of reconciliation.

Exact definition and boundaries

Object or flagMeaningBoundary
Webhook providerschool-scoped adapter configurationnot a provider settlement account
Provider codestable adapter/provider identitynot a merchant payout ID
Field mappingsource payload key to normalized field mappingnot a guarantee the source schema is unchanged
HMAC/API secretauthentication/verification materialmust never be displayed or copied into documentation
Callback URLendpoint provider callsnot proof events are arriving
isActiveconfiguration is enablednot proof provider credentials work
autoReconcileprovider configuration permits automated downstream behaviornot proof an event was correctly matched/reconciled
Webhook eventretained received/processed messagenot automatically a Payment
Raw payloadoriginal provider messagesensitive evidence requiring controlled access
Normalized datamapped fields used by Makronexusmust remain traceable to raw payload
Statisticsaggregate event counts and amountsnot transaction-level reconciliation evidence

Verified provider types are bank, mobile_money and payment_gateway. Built-in provider codes include generic-bank, ecocash, onemoney and telecash; other channel workspaces may use additional gateway configurations through the unified Payment Attempt layer.

Provider model

Provider configuration fields

FieldMeaningControl
Provider codestable integration identifierdo not change casually after events exist
Provider nameoperator-facing labelinclude bank/channel and merchant scope
Provider typebank, mobile money or gatewaymust match integration design
Schoolowner scopenever reuse across schools without supported design
Active flagaccepts/uses provider configurationdisable through controlled change
Field mappingsource-to-normalized keysversion/test when source schema changes
Configcredentials, signature and callback settingssecrets must be masked and access-restricted
Auto reconciledownstream automation preferencetest and monitor; never treat as evidence
Default currencyfallback provider currencyexplicit event currency still requires validation
Webhook URLcallback endpointconfirm provider registration and environment
Last event / total eventsoperational health indicatorsabsence/presence requires context

The config contract may include API key, API secret, HMAC secret/header, signature algorithm, callback URL and metadata. Operational documentation must refer to secret names, not secret values.

Roles and exact permissions

ActionExact API abilityControl
Create providerbank_webhook:createconfiguration maker
Read provider or eventbank_webhook:readsensitive evidence access
Update providerbank_webhook:updatetest and approval required
Delete providerbank_webhook:deletepreserve event/audit retention
List providers/eventsbank_webhook:listdaily monitoring
View statisticsbank_webhook:statisticsaggregate operations
Server callbackbank_webhook:callbackservice-to-service, not normal frontend use
Create Payment Attemptpayment_attempt:createcustomer/channel initiation
Read attemptpayment_attempt:readtrace callback lineage
List attemptspayment_attempt:listsearch duplicates/failures
Confirm attemptpayment_attempt:confirmexceptional administrative action
Cancel attemptpayment_attempt:canceldoes not refund/settle
List reconciliation itemsreconciliation_item:listinspect downstream state
Resolve discrepanciesreconciliation:resolve_discrepancyevidence and notes required

The current Bank Webhooks page uses legacy/generic frontend gates based on financial_payment/payments capabilities for visibility and provider mutations, while the API guide defines exact bank_webhook:* permissions. Treat both layers seriously: page visibility is not proof the API request will succeed, and a legacy gate should not be documented as a universal webhook authority.

Event types and processing statuses

Verified event types:

Event typeTypical meaningRequired investigation
transaction.receivedprovider reports an incoming transactionlink to attempt/Payment and later settlement
transaction.reversedprovider reports reversaltrace original and correction effects
transaction.failedprovider reports unsuccessful transactionensure no Payment/economic effect exists
notificationnon-transaction provider messageinspect normalized purpose; do not assume money movement

Verified processing statuses:

completed describes webhook processing. It does not guarantee the provider transaction is final or that every downstream record exists.

Secure callback sequence

Never reveal whether a secret value was correct in user-facing errors. Retain request IDs and provider event IDs for support.

Prerequisites

RequirementWhy it matters
Approved provider and merchant agreementdefines sender and event semantics
Correct tenant/school configurationprevents cross-school financial effects
Production callback URL registeredevents must reach the correct environment
Signature/HMAC design and secret rotation processverifies origin and integrity
Field mapping tested with signed fixturesnormalized values must be reproducible
Idempotency/external event identityprotects against retries and duplicates
Payment Attempt integrationcallback must link to the owning attempt
Monitoring owner and escalation routefailures require timely action
Reconciliation processcompleted events still need financial comparison
Security-controlled raw payload accesspayloads may contain personal/financial data

Configure a provider safely

1. Define scope

Record provider code, merchant account, school, provider type, default currency, supported event types and environment.

2. Create credentials outside documentation

Generate or receive API/HMAC credentials through the approved secret-management process. Do not store secrets in tickets, screenshots, spreadsheets or documentation.

3. Configure field mappings

Map provider fields for external reference, amount, currency, sender/payer identity, student reference, invoice reference, event type and status where supported.

Expected result: a signed test fixture produces the expected normalized data.

4. Configure callback and signature verification

Register the exact callback URL with the provider. Confirm required signature header and algorithm.

Expected result: invalid signatures are rejected and valid signed fixtures are accepted.

5. Set activation and automation deliberately

Enable the provider only after end-to-end testing. Set autoReconcile only if the approved workflow and monitoring can support it.

Control: automation must not bypass Payment, matching, review or accounting controls.

6. Complete negative tests

Test:

  • invalid signature;
  • missing signature;
  • wrong school/provider;
  • duplicate event ID;
  • changed amount on repeated ID;
  • unsupported event type;
  • malformed currency/amount/date;
  • delayed event;
  • reversal after success;
  • provider timeout/retry.

Daily monitoring workflow

Recommended daily questions:

  1. Did every active provider send events within the expected operating window?
  2. Are any events stuck in received or processing?
  3. Are failed events increasing by provider or event type?
  4. Are duplicates normal retries or conflicting payloads?
  5. Are ignored events understood?
  6. Do completed transaction events link to Attempts and Payments?
  7. Do provider totals agree with the frozen reconciliation population?
  8. Are reversals/failed events reflected in correction workflows?
  9. Are secrets, callback URLs or field mappings near a planned change?
  10. Are unresolved blocking exceptions assigned?

Event investigation procedure

1. Freeze identifiers

Record event ID, provider ID/code, external reference, event type, status, amount, currency, school, created time and request ID.

2. Compare raw and normalized evidence

Inspect raw payload under controlled access. Compare each normalized financial and matching field to its source key and mapping.

3. Verify signature/identity evidence

Use server logs or security evidence; do not expose secrets. Confirm event identity and duplicate rules.

4. Trace downstream lineage

Search Payment Attempts using provider/external reference. Confirm attempt status and linked Payment ID. Inspect Payment amount/currency and downstream reconciliation item.

5. Classify the event

  • processing delay;
  • handler/service error;
  • duplicate retry;
  • conflicting duplicate;
  • unsupported notification;
  • provider reversal/failure;
  • missing Payment;
  • wrong school or merchant;
  • mapping/data-quality defect.

6. Recover idempotently

Retry processing only through the supported operation or service path using the same external/idempotency identity. Do not manually create duplicate Payments.

7. Reconcile and close

Ensure the corrected event is reflected in provider and bank reconciliation. Record action, actor, timestamp and result.

Statistics and alerting

Provider statistics include total events, completed events, failed events, duplicate events, total amount, currency and last event time. Useful indicators include:

IndicatorPossible issueRequired drill-down
No recent eventsprovider/callback outage or no activityprovider health and expected volume
Rising failed rateschema, credentials or worker failureevent errors and deployment changes
Rising duplicatesprovider retry storm or slow acknowledgementsexternal IDs and payload equality
Amount spiketrue volume or mapping/decimal errortransaction-level events
Completed without Paymentdownstream handler gapattempt and Payment lineage
Reversal spikeprovider or fraud/chargeback activityoriginal events and corrections

Do not convert a statistic into a financial conclusion without transaction-level evidence.

Change and secret rotation control

When changing provider configuration:

  1. capture the current configuration fingerprint without exposing secrets;
  2. approve the change and maintenance window;
  3. retain old/new mapping versions;
  4. rotate credentials through secret management;
  5. coordinate provider callback changes;
  6. run positive and negative signed fixtures;
  7. monitor both old and new event flows where overlap is required;
  8. confirm no event loss or duplicate economic effect;
  9. record rollback criteria;
  10. complete reconciliation after the change.

Worked scenario: Mupfure Learning Academy

Mupfure’s mobile-money events normally arrive every few minutes. The dashboard shows 60 failed events after the provider added a nested transaction.amount field and stopped sending the previous top-level amount.

The events are signed correctly and retained as failed. The support analyst compares raw and normalized payloads and confirms the mapping defect. No second provider configuration is created. An authorised administrator updates the field mapping under bank_webhook:update, tests signed fixtures, and reprocesses events through the supported idempotent path.

Fifty-eight events link to existing processing attempts and create/link Payments exactly once. Two events are duplicates with identical external IDs and payloads; they remain duplicate. The team reconciles the recovered population to the provider report and bank payout before closing the incident.

Failure modes

SymptomLikely causeEvidence to inspectSafe actionEscalate when
Provider has no recent eventscallback, credentials, provider outage or no activitylast event time, provider health, logstest without changing financial dataactive payments exist but no callback evidence
Events stuck processingworker/queue failureevent age, request/job IDsrecover through supported worker pathbacklog threatens settlement/close
Failed events share one field errorprovider schema changedraw payload and mappingversion/test mapping updateprior completed events may be wrong
Duplicate events have different amountsprovider reused ID or tampering/data defectsignatures and raw payload hashesquarantine; do not choose one silentlyeconomic effects already exist
Completed event has no Paymentdownstream confirmation failureattempt/provider IDs and auditidempotent recoveryno safe automated recovery
Event linked to wrong schoolmerchant/provider scope defectprovider config and payload identifiersstop provider and contain effectscross-school data/economic effects occurred
Reversal event ignoredunsupported mapping or workflow gapevent type and original Paymentcreate controlled correctionstatement/provider evidence diverges
Auto reconcile appears successful but batch differsautomation is incomplete or thresholds wrongreconciliation items and configtreat as exception and reviewbatch/period was closed
Secret shown in UI/logmasking or logging defectaccess logs and screenshotsrotate secret and contain accessproduction credential exposure
Delete provider would remove contextdestructive configuration actionevent history/retention policydisable and retain where requiredAPI delete conflicts with audit policy

Verification checklist

  • Provider code, type, school, merchant scope and currency are approved.
  • Callback URL points to the intended environment.
  • Secrets are stored and rotated securely.
  • Signature and negative tests pass.
  • Field mappings are versioned and tested.
  • Duplicate identity behavior is verified.
  • Active and auto-reconcile flags are deliberate.
  • Event statuses are monitored daily.
  • Failed, duplicate and ignored events are understood.
  • High-value completed events trace to attempts and Payments.
  • Reversal/failure events trace to correction workflows.
  • Provider event totals reconcile to provider reports and batches.
  • Bank payout evidence is separately reconciled.
  • Configuration changes include rollback and post-change reconciliation.
  • Raw payload access and retention are controlled.

Practice and knowledge check

Guided practice: use signed fixtures for one successful event, one invalid signature, one duplicate, one changed-payload duplicate and one reversal. Prove the expected status and downstream effect of each.

Independent scenario: statistics show 100 completed events and USD 10,000 processed, but the provider report contains USD 9,700 and the bank received USD 9,500. Build the investigation sequence.

  1. What does completed mean?
  2. Why is autoReconcile not proof?
  3. Which permissions govern provider CRUD and event access?
  4. Why must raw and normalized data both be retained?
  5. What is the correct response to a duplicate with different payload data?
  6. Why should failed events not be repaired by manually creating Payments?
  7. What should daily monitoring cover?
  8. Why must provider statistics be reconciled to report and bank evidence?
  9. What must happen after a field-mapping change?

Answer guide: completed means event processing succeeded; automation still requires result verification; use bank_webhook:create/read/update/delete/list/statistics; raw data proves source and normalized data proves interpretation; conflicting duplicates must be quarantined; manual Payment creation risks duplication; monitor freshness/backlogs/failures/duplicates/lineage/totals/exceptions; statistics are aggregates, not settlement; test, reprocess idempotently, reconcile and retain change evidence.

P6 completion gate

P6 is complete when an independent reviewer can:

  • reproduce a bank import from retained provenance;
  • reconcile every source row and control total;
  • match external lines to correct Payments;
  • explain all residual items and amounts;
  • reconcile provider gross activity to net payout and bank credit;
  • prove webhook event lineage and duplicate handling;
  • operate continuous exception ownership, escalation and certification;
  • identify unresolved external, accounting and period-close handoffs without hiding them.

Next phase

Continue to P7 when published for dashboards, revenue and collection reporting, receivables/ageing, cash-flow forecasting, accounting/statutory reporting, evidence exports and multi-currency/consolidated reporting.