Infrastructure
Service-owned infrastructure is AWS, defined in Terraform under deploy/ and applied per environment by .github/workflows/deploy.yaml; the JPM webhook gateway and every DynamoDB table are owned elsewhere (API Gateways, DynamoDB Tables). The application identifier is payments; resource names carry the site-payments- prefix (test, staging, or prod). Staging is a separate AWS account configured like test. Two regions are in play:
| Region | Holds | test | staging | prod |
|---|---|---|---|---|
Primary ( |
Lambdas, API gateways, queues, the |
|
|
|
Legacy ( |
The |
|
|
|
Lambda Functions
Timeouts marked * derive from the consumed queue’s visibility timeout (90%; 50% for prenoter and debit-card-fixer). Memory is the fmtf-module-lambda default unless shown.
| Function | Trigger | Timeout | Memory | Concurrency | Key IAM Permissions |
|---|---|---|---|---|---|
|
API Gateway |
300s |
256 MB in prod (512 elsewhere) |
— |
DynamoDB R/W on |
|
SQS |
30s* |
default |
5 |
Invoke the |
|
EventBridge |
900s |
2048 MB |
— |
DynamoDB Query |
|
SQS |
54s* |
default |
5 |
DynamoDB PutItem |
|
EventBridge (three Usio rules) |
30s |
default |
— |
SQS SendMessage |
|
SQS |
810s* |
1024 MB |
1 |
DynamoDB BatchWrite/Get on Usio staging tables; Query/Get/Put on |
|
SQS |
540s* |
default |
5 |
DynamoDB PutItem |
|
DynamoDB Stream on |
840s |
default |
— |
Kinesis PutRecord(s) on |
|
API Gateway |
300s |
default |
— |
SQS SendMessage |
|
SQS |
540s* |
default |
5 |
DynamoDB Get/Put |
|
Kinesis |
840s |
default |
— |
DynamoDB Put/Delete |
|
EventBridge |
60s |
default |
— |
Usio float_credit, loan_credit, slack secrets |
|
EventBridge |
600s |
default |
— |
DynamoDB PutItem |
|
EventBridge |
600s |
default |
1 |
DynamoDB Query |
|
SQS |
54s* |
default |
5 |
DynamoDB Put/Delete |
|
SQS |
30s* |
default |
5 |
DynamoDB R/W |
SQS consumers other than prenoter, usio-syncer, and debit-card-fixer report partial batch failures (ReportBatchItemFailures).
API Gateways
| Gateway | Type | Auth | Integration |
|---|---|---|---|
|
HTTP API |
AWS IAM |
|
|
REST API (regional) |
AWS IAM |
|
|
HTTP API in the |
AWS IAM |
Routes to |
site-payments is also reachable as payments.site.svc.floatme.io and site-payments-rest as payments-rest.site.svc.floatme.io (deploy/domain.tf): alias records in the infrastructure repo’s per-environment site.svc.floatme.io zone, using its wildcard certificate. The execute-api endpoints stay enabled for existing callers.
The API Lambda’s fmsdk/authorizer middleware admits a request whose IAM identity matches the service’s AWS account ID; any other request must carry authorizer claims whose subject equals the user_id in the route, which is how mobile requests arriving through the shared mobile API host are authorized. POST /qa/payments acts only when ENVIRONMENT is test or staging.
SQS Queues
| Queue | Visibility | Max Receive | Redrive DLQ | Consumer |
|---|---|---|---|---|
|
60s |
10 |
|
prenoter |
|
900s |
10 |
|
usio-syncer |
|
60s |
1 |
|
check-ach-worker |
|
600s |
10 |
|
blocklist-remover |
|
600s |
10 |
|
jpm-webhook-processor |
|
60s |
1 |
|
usio-refresh-worker |
|
60s |
1 |
|
debit-card-fixer |
All DLQs have a 900s visibility timeout. site-payments-debit-fixer-dlq is provisioned but no queue redrives to it. Producers are listed in Events.
Kinesis
site-payments is the outbound event stream (region kinesis_stream_region, defaulting to the primary region). kinesis-feeder writes it; blocklist-handler consumes it with filter data.type in SUBSCRIPTION_RETURNED, FLOAT_DEBIT_RETURNED, batch size 10, parallelization factor 2, starting position LATEST, BisectBatchOnFunctionError, and ReportBatchItemFailures. Other consumers are listed in Events.
DynamoDB Tables
Schemas and item types are in DynamoDB Tables. Terraform reads every table as a data source; none is created in this repo.
| Table | Region | Role |
|---|---|---|
|
Legacy |
Payment records; DynamoDB stream → kinesis-feeder |
|
Primary |
Single table: debit cards, bank accounts, card attempts, blocklist, RTP cache, ACH risk reports, marketing locks |
|
Legacy |
One-card-per-user debit card mirror |
|
Legacy |
Debit card change history |
|
Legacy |
Refund records |
|
Legacy |
Usio transaction staging |
|
Primary |
Usio tokenization-account staging |
|
Legacy |
JPM transaction detail staging |
|
Primary |
Fraud log |
EventBridge
| Rule | Schedule | Enabled | Target | Input |
|---|---|---|---|---|
|
|
prod only |
usio-scheduler |
|
|
|
prod only |
usio-scheduler |
|
|
|
prod only |
usio-scheduler |
|
|
|
always |
check-ach-scheduler |
— |
|
|
always |
usio-refresh-scheduler |
— |
|
|
prod only |
balance-reporter |
— |
|
|
prod only |
balance-reporter |
|
|
|
always |
jpm-syncer |
— |
Secrets Manager
All secrets are namespaced site/….
| Secret | Contents | Consumers |
|---|---|---|
|
Master (tokenization) merchant credentials |
api, usio-syncer, usio-refresh-worker |
|
Debit merchant credentials |
api, usio-syncer |
|
Credit merchant credentials |
api, usio-syncer, balance-reporter |
|
JPM ACH account info; JWS signing cert |
api |
|
mTLS client cert; JPM public certs |
api, check-ach-worker, jpm-syncer |
|
Hash salt for account and card hashes |
api |
|
GrowthBook SDK key |
api, check-ach-worker, blocklist-handler |
|
Iterable API key |
api, blocklist-handler |
|
Segment write key |
api, usio-syncer |
|
AppsFlyer S2S key |
api |
|
Slack bot token |
balance-reporter |
|
Datadog API and app keys |
Terraform only |
|
Plaid credentials |
Data source only; no Lambda receives it |
Provider endpoints: Usio https://payments.usiopay.com (prod) / https://devpayments.usiopay.com (elsewhere); JPM https://apigateway.jpmorgan.com (prod) / https://apigatewayqaf.jpmorgan.com (elsewhere).
KMS
alias/site-payments-bank-account (region kms_region, defaulting to the primary region) encrypts bank account and routing numbers — Bank Accounts. Only the API Lambda holds kms:Encrypt / kms:Decrypt.
Monitoring
Datadog monitors and SLOs exist in prod only (local.create_datadog_monitors in deploy/datadog.tf). Alerts outside prod go unread, and the old and new test accounts both deploy as test, so Datadog would reject the second account’s identical monitors as duplicates.
In prod, each SLO has a 99.9% target / 99.99% warning over 7-day and 30-day windows:
| SLO | Lambdas |
|---|---|
Errors |
prenoter, check-ach-scheduler, check-ach-worker, usio-scheduler, usio-syncer, blocklist-remover, api, kinesis-feeder, jpm-webhook-handler, jpm-webhook-processor, blocklist-handler, balance-reporter |
Throughput |
prenoter, check-ach-scheduler, usio-scheduler, usio-syncer, blocklist-remover, jpm-webhook-handler, jpm-webhook-processor, blocklist-handler, balance-reporter |
Latency |
prenoter, check-ach-scheduler, check-ach-worker, usio-scheduler, usio-syncer, blocklist-remover, api, kinesis-feeder, jpm-webhook-handler, jpm-webhook-processor, balance-reporter |
The Datadog service definition registers payments as tier 1 (team devops) with links to the repo and https://docs.floatme.io/payments-service.