Your App Is Talking to a Machine: Architecting Mobile FinTech Against Bots, Farms, and Automated Users
DEV Community

Your App Is Talking to a Machine: Architecting Mobile FinTech Against Bots, Farms, and Automated Users

A valid OTP arrived. The device passed an integrity check. The API request contained a legitimate access token. The app binary was genuine. And yet the financial workflow may still be controlled by automation.

That is the uncomfortable gap in modern mobile FinTech security. Traditional controls are very good at answering questions such as:

  • Is the account authenticated?
  • Is the application genuine?
  • Does the device satisfy the expected integrity level?
  • Is the API request authorized?

But those checks do not necessarily answer another important question: Who-or what-is driving the legitimate application?

The Problem

Automation does not always need to reverse-engineer your API or compromise a rooted device. A physical device farm can operate the real application across genuine phones, legitimate accounts, real SIMs, and successfully authenticated sessions.

From the backend's perspective, many individual requests may look completely valid. The abuse becomes visible only when the system looks at the context surrounding those requests. For example:

many accounts
    ↓
small device population
    ↓
repeated beneficiaries
    ↓
compressed workflow timing
    ↓
same economic outcome

The important signal may not exist inside any individual API request. It may exist in the relationship between requests.

That changes the problem from simple client security into a broader risk, backend, and distributed-systems problem.

Where It Gets Difficult

1. Device integrity is evidence, not identity

A clean device does not automatically imply legitimate intent. Integrity mechanisms can strengthen confidence around the application and execution environment, but they should contribute to a broader risk decision rather than replace it.

A genuine application can still be operated repeatedly. A genuine phone can still participate in coordinated abuse.

2. Authentication does not prove human presence

Successful OTP or biometric verification establishes that the configured authentication requirement was satisfied. It does not automatically prove that every later action is being manually performed by a legitimate human.

Authentication and fraud detection therefore solve related but different problems.

3. IP rate limiting is not enough

A simple rule such as 100 requests / minute / IP can protect infrastructure. But business abuse may be distributed across many networks, devices, and accounts.

For financial workflows, useful limits may instead need to consider dimensions such as:

  • account
  • device
  • identity
  • beneficiary
  • payment destination
  • promotion
  • merchant
  • operation

The correct rate-limit key depends on the business invariant being protected.

4. Eventual consistency can create an abuse window

Imagine promotional eligibility is updated asynchronously:

Claim API
    ↓
Reward Service
    ↓
Kafka
    ↓
Risk Consumer
    ↓
Device Counter

This may work well for analytics. But if the reward is granted before the relevant counter is updated, several requests may pass before the asynchronous state converges.

At that point, the problem is not just bot detection. It is consistency.

If an invariant must hold before money moves, the critical eligibility decision may require synchronous or sufficiently strong enforcement.

Architectural Direction

A stronger design separates responsibilities:

  • The mobile app contributes platform evidence and secure authentication UX.
  • The platform provides application, device, or environmental integrity signals where supported.
  • The risk layer correlates behavioral, historical, velocity, and relationship signals.
  • The domain backend enforces the financial invariant.

Conceptually:

Mobile Request
      ↓
API / BFF
      ↓
Domain Authorization
      ↓
Risk Orchestrator
  ┌────────┬─────────────┬───────────────┐
  ↓        ↓             ↓
Device    Behavioral    Account /
Signals   Signals       Transaction
  └────────┴─────────────┴───────────────┘
               ↓
          Risk Decision
               ↓
      Domain State Transition

The risk layer should not become a second payments database.

  • The payment service should still own payment state.
  • The promotion service should still own promotion eligibility.
  • The onboarding service should still own onboarding state.

Risk evaluation contributes evidence and policy decisions, while the domain service remains responsible for enforcing its own invariant.

That also means avoiding APIs where downstream systems depend directly on arbitrary internal scores such as:

{
  "riskScore": 73
}

A more stable integration can expose policy-oriented results instead:

{
  "decision": "CHALLENGE",
  "policy": "TRANSFER_HIGH_RISK_V4",
  "reasonCodes": [
    "DEVICE_ACCOUNT_VELOCITY",
    "NEW_BENEFICIARY"
  ]
}

The internal detection model can evolve without every downstream service inventing its own threshold.

Think in Risk Transitions

Not every screen requires the same confidence. Opening a dashboard is different from:

  • adding a beneficiary
  • recovering an account
  • initiating a payout
  • claiming a financial incentive
  • changing high-risk profile information

Instead of attaching heavyweight controls to every screen, identify the business transitions where uncertainty has meaningful financial consequences.

The response does not always need to be binary either. A policy may choose among:

ALLOW
  ↓
OBSERVE
  ↓
RATE LIMIT
  ↓
STEP-UP
  ↓
VERIFY
  ↓
REVIEW
  ↓
RESTRICT
  ↓
BLOCK

That reduces the temptation to permanently label a device as malicious based on one weak signal.

The Takeaway

The wrong architectural question is: “Is this phone a bot?”

A more useful question is: “Do we have enough confidence to allow this financial state transition?”

Because a request can be authenticated. The device can be genuine. The application can be untampered. The API contract can be completely valid. And your application can still be talking to a machine.

Want the deeper architectural breakdown, implementation considerations, consistency problems, attestation boundaries, failure modes, and full reasoning? Read the full article on Medium.

#MobileSecurity #FinTechArchitecture #FraudPrevention #SoftwareArchitecture

Top comments (0)

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.