Skip to content
Compliance10 min read

Building a goAML Integration: STR and CTR Reporting That Passes Validation

By

Every regulated institution in Pakistan that files with the Financial Monitoring Unit eventually meets goAML. Most meet it badly. The platform itself is well documented, but the documentation describes a schema, and teams consistently underestimate how much engineering sits between "we have transaction data" and "FMU accepted our report."

This is a build guide. It assumes you already know why you are reporting and focuses on what breaks when you do.

What goAML actually is, and why that matters architecturally

goAML is a platform developed by the United Nations Office on Drugs and Crime for financial intelligence units. FMU uses it to receive Suspicious Transaction Reports (STRs) and Currency Transaction Reports (CTRs). The critical property for you as an engineer: submission is schema-validated XML, not a form and not a flexible API.

That single fact should drive your design. A schema contract is unforgiving in a way REST endpoints usually are not — there is no partial success, no best-effort parsing, no field the receiver will quietly ignore. Your submission is accepted whole or rejected whole. Teams that model reporting as "an export at the end of the pipeline" discover this late; teams that model the schema as a first-class domain object in their data layer do not.

The reporting entity is not your organisation chart

goAML has its own entity model — reporting entity, report, transaction, party, account — and it does not map cleanly onto a typical core banking schema. A "party" in goAML carries a role relative to a transaction (conductor, beneficiary, originator), and the same legal person can appear as several parties with different roles inside one report.

The mistake we see most: teams model parties as a foreign key to their existing customer table. It works until a report involves a non-customer counterparty, at which point there is no customer record to point at and the pipeline either fabricates one or drops the party. Both are reportable defects. Model the goAML party as its own construct, populated from your customer data rather than being a view of it.

The rejection causes, in the order you will hit them

Across remediation work on institutions of very different sizes, the same failures recur. In rough frequency order:

1. Identifier type mismatches

The CNIC is the identifier for most Pakistani natural persons, and it has a specific type in the schema. Placing it in a passport or "other" field produces XML that validates and is analytically wrong — the worst possible outcome, because nothing bounces and the defect surfaces months later during an inspection. Constrain identifier type at the domain layer, not with a comment in the mapping code.

2. Conditionally mandatory fields

Large parts of the goAML schema are conditionally required: field B is mandatory only when field A takes a particular value. Teams model the unconditionally required set, write tests against it, pass, and then fail against real cases where the condition triggers. Enumerate the conditional rules explicitly and test each branch with a fixture. This is tedious and it is the single highest-return test suite in the whole pipeline.

3. Date, currency and numeric formatting

Locale-aware formatting is the enemy here. A date rendered per the server's locale, a currency amount with thousands separators, a decimal comma instead of a point — each is a rejection. Serialise to the schema's expected forms explicitly and never rely on a default toString().

4. Narrative quality

The reason-for-suspicion narrative is schema-free text, so it never fails validation — and it is the part a human analyst actually reads. "Unusual activity detected by system" is technically a submission and practically a waste of a filing. A useful narrative states what the expected behaviour for this customer profile was, what was observed instead, over what period, and what the institution's own review concluded. Give your compliance team a structured template rather than an empty textarea.

Build a validation stage that mirrors the receiver

The single highest-leverage design decision is this: run the same XSD validation FMU runs, inside your own pipeline, before submission. It is not difficult — the schema is available to registered reporting entities — and it converts a slow, opaque, externally-visible failure into a fast, local, invisible one.

A pipeline we would consider production-ready has four stages:

  • Extract — assemble the case: alert, transactions in scope, parties, accounts, and the analyst's disposition.
  • Map — transform into goAML domain objects. This stage owns the identifier-type and conditional-field rules, and it should fail loudly rather than emit a partial object.
  • Validate — serialise and run XSD validation locally. Failures here never leave the building.
  • Submit and reconcile — transmit, then persist the acknowledgement against the case. A submission with no recorded acknowledgement is an unfiled report, and you will not know unless you reconcile.

The operational half nobody budgets for

Getting a valid report out of the door is the visible half of the work. The half that gets institutions in trouble is what happens afterwards.

Retention and reproducibility. You must be able to reproduce, months later, exactly what you submitted and exactly what the system knew when it decided to submit. That means versioning the rules and thresholds that produced the alert, not just storing the final XML. If a threshold changed in March, a report filed in February must still be explicable against February's configuration.

Rejection handling as a workflow, not an exception. Rejections will happen. If your only handling is an error log, they become silent unfiled reports. Rejections need an owner, a queue, an SLA and an escalation path — the same seriousness you would give a failed payment.

Schema version changes. The schema is not frozen. Treat a schema update as a release with its own regression suite, and keep fixtures for both versions during any transition window.

What we would tell you before you start

If you are scoping this work, three honest expectations. The mapping layer is where the effort actually lives — typically more than the extraction and transmission combined, because it encodes every conditional rule. The compliance team must be in the design sessions, not shown a demo at the end, because narrative structure and disposition workflow are their domain and retrofitting them is expensive. And build the local XSD validation first, before any mapping code, so that every subsequent commit is checked against the real contract rather than against your understanding of it.

Done this way, goAML reporting becomes a boring, reliable part of the platform. Done as an afterthought export, it becomes the thing that fails during an inspection.

Primary sources

How we help with this

#goAML#STR#CTR#FMU Pakistan#AML#Compliance Engineering
About the author
Ali Zaidi, Chief Operating Officer of NovuLabs
Chief Operating Officer

Ali runs delivery operations and the compliance practice at NovuLabs, including AML/CFT engagements with SBP-regulated institutions. He writes here on goAML integration, transaction monitoring design, and what regulatory examination actually asks of a system.

Related reading

Compliance
Navigating AML/CFT Regulations in Pakistan: An Engineering Guide for Fintechs

How SBP and FMU requirements translate into actual system architecture: screening, transaction monitoring, and goAML-conformant STR/CTR reporting.

Read article
Identity
Digital KYC in Pakistan: Designing CNIC and Biometric Verification That Holds Up

How to design identity verification around CNIC and biometric checks for Pakistani financial and government platforms — including consent, data minimisation, fallbacks and audit evidence.

Read article
Consult our team

Need guidance implementing
these solutions?

Our engineers build compliance pipelines, scale payment switches and design HIPAA-ready architectures daily. Bring your systems architecture and we will look at it with you.

Schedule a free technical review
Book a technical callExplore case studies