Architecture
System Context
The Float Service is deployed as a set of AWS Lambda functions. It exposes a REST API behind API Gateway and participates in the broader FloatMe platform as both an event-driven consumer (Kinesis, SQS, EventBridge) and producer (EventBridge).
Inbound Traffic
| Source | Description |
|---|---|
|
IAM-authenticated requests from internal FloatMe services and JWT-authenticated requests from the mobile app via the global FloatMe API gateway. |
|
Work queue consumed by the collections-worker Lambda. Messages are enqueued by the collections-scheduler at each scheduled collection run. |
|
Prenote work queue consumed by the prenote-worker Lambda. Messages are enqueued by the prenote-scheduler on its weekday run. |
|
Income detection events from the Insight Service, routed via an EventBridge rule. Consumed by the webhook-worker Lambda. |
|
Balance update events from the Transactions Service, routed via an EventBridge rule. Consumed by the webhook-worker-balance Lambda. |
|
Batch operation requests consumed by the batch-worker Lambda. |
|
Payment outcome events from the Payments Service, filtered for |
EventBridge (schedule) |
CloudWatch rules invoke the collections-scheduler on a recurring schedule, the prenote-scheduler weekdays at 12:30 UTC, and the reporter Lambda daily at 12:00 UTC. |
Outbound Traffic
| Destination | Description |
|---|---|
|
Float lifecycle events (e.g. |
Segment |
User analytics events emitted by the ach-handler for float creation, payback, and collection outcomes. |
Iterable |
Email and in-app notifications triggered by ACH payment events from the ach-handler. |
AppsFlyer |
Mobile attribution events for float creation, emitted by the ach-handler. |
Slack |
Daily float origination report sent by the reporter Lambda. |
Lambda Functions
| Function | Trigger | Responsibility |
|---|---|---|
|
API Gateway (IAM + JWT) |
Primary REST API. Handles all float CRUD, bypass management, payback, collection history retrieval, and admin operations. Publishes |
|
EventBridge (T-1 Day: 09:30 UTC, Due Date: 09:30 UTC, Daily Retry: 08:30 UTC) |
Queries RDS for floats due for collection at each schedule stage. Enqueues qualifying floats to the |
|
SQS ( |
Dequeues float collection jobs. Acquires a DynamoDB distributed lock per user, then attempts pinless debit or ACH collection via the Payments Service. Updates float status on outcome and logs the attempt to DynamoDB. |
|
SQS ( |
On income detection, checks whether the user has a float in RETRY status, validates daily attempt limits and balance thresholds, then attempts collection if criteria are met. |
|
SQS ( |
On balance update events, evaluates whether a RETRY float can be collected based on the updated balance. Attempts opportunistic collection if eligible. |
|
Kinesis ( |
Consumes ACH payment callbacks. Updates the float’s status based on the payment outcome. Notifies the user via Segment, Iterable, and AppsFlyer. |
|
EventBridge (weekdays, 12:30 UTC) |
Queries RDS for floats in |
|
SQS ( |
Fetches user identity from the User Service and submits a zero-dollar USIO prenote to the Payments Service. Concurrency capped at 3. |
|
SQS ( |
Processes bulk float operations and data management tasks. |
|
EventBridge (daily, 12:00 UTC) |
Queries RDS for float origination metrics and sends a daily summary report to a Slack channel. Enabled in production only. |
Collections Architecture
The collections system uses two parallel processing paths — scheduled and webhook-driven — both funneling into the Payments Service for execution.
See Collections Engine for the detailed flow diagrams and decision logic for each collection stage.
Data Storage
RDS PostgreSQL: FloatMeAPI_userloansmodel
The primary data store for float records. Holds one row per float with status, amounts, dates, and payment references. Both the API and all collection Lambdas read and write to this table.
Column Type Description ────────────────────────────────────────────────────────────────── loan_id uuid Primary key user_id_id varchar Owning user loan_type varchar NORMAL or PINLESS loan_amount varchar Advance amount ach_debit_status varchar Float status (see status reference) ach_debit_date timestamp Due date for collection ach_credit_id varchar Disbursement payment reference ach_debit_id varchar Latest collection payment reference fee varchar Fee charged to the user evaluation_id varchar Underwriting evaluation reference
See PostgreSQL Schema for the full column reference and status values.
DynamoDB
Three DynamoDB tables support the collections engine:
| Table | Purpose |
|---|---|
|
Append-only audit log of every collection attempt. PK: |
|
Distributed locks preventing concurrent collection attempts on the same user. 60-second lease with 1-second heartbeat. |
|
Per-user eligibility overrides with an expiration date. Used by the bypass API endpoints. |
See DynamoDB Tables for full schema and access pattern details.
External Service Integrations
| Service | Integration |
|---|---|
Payments Service |
Core payment execution layer. The API Lambda submits disbursements on float creation. Collection Lambdas submit pinless debit and ACH attempts. The prenote-worker submits zero-dollar USIO prenotes via |
Underwriting Service |
Queried by the API Lambda on float creation to validate eligibility and retrieve the approved amount and fee. |
User Service |
Queried by the API and collection Lambdas for user profile and identity data. The prenote-worker fetches first name, last name, and email here before submitting each prenote. |
Transactions Service |
Queried by collection Lambdas for current bank account balance data to inform collection routing decisions. |
Insight Service |
Source of income detection events that drive webhook-triggered collections. Events are routed via EventBridge to the |
Subscriptions Service |
User subscription status checked during collection eligibility evaluation. |
GrowthBook |
Feature flags controlling collection behavior, ACH routing decisions, the embedded ML model configuration, and per-user prenote enrollment via |
Segment |
User analytics events emitted by the ach-handler on payment outcomes. |
Iterable |
Email and in-app notifications triggered by ACH events in the ach-handler. |
AppsFlyer |
Mobile attribution tracking for float creation events. |
LOC Service |
Line-of-credit eligibility data used in fraud checks during float creation. |
Related Pages
-
PostgreSQL Schema — Full float entity schema and status reference
-
DynamoDB Tables — Collection history, locks, and bypass table schemas
-
Collections Engine — Detailed collection flow diagrams
-
API Specification — Full OpenAPI spec