Events
Event contracts for the Payments Service: what it publishes to the site-payments Kinesis stream and what it consumes. Flow behavior lives on the domain pages linked from each row.
Published
site-payments-kinesis-feeder consumes the DynamoDB stream of the payments table (schema). For every stream record it:
-
Unmarshals the new image as a payment; a record with an empty
event_typeis skipped. -
Builds an
fmsdk.Event—id=confirmation_id,type=event_type,source=PaymentService,version=V2,data= the payment in theGET /payments/{confirmation_id}shape. -
Puts the record on
site-paymentswith the confirmation ID as the partition key.
Payments are written at submission with an empty event_type; the later write that sets event_type on a status change is the one published. The exception is a safe-retry recovery of a pinless charge for an ACH request, written with FLOAT_DEBIT_COMPLETED or SUBSCRIPTION_COMPLETED. Prenotes are written with PRENOTE_SUBMITTED and publish at submission. PATCH /payments/{confirmation_id} clears event_type on its write, and that update is not republished.
Source: pkg/feeder/feeder.go
Event Types
Consumers are the sibling services whose Kinesis event-source filters name the type (their deploy/*.tf, checked in this pass).
event_type |
Written by | Consumers |
|---|---|---|
|
check-ach-worker, api (safe retry) |
subscription-service |
|
jpm-webhook-processor, usio-syncer |
blocklist-handler, subscription-service |
|
usio-syncer |
subscription-service, user-service |
|
api ( |
subscription-service |
|
check-ach-worker, api (safe retry) |
float-service |
|
check-ach-worker (Plaid clearing) |
float-service |
|
usio-syncer |
blocklist-handler, float-service |
|
usio-syncer |
float-service, user-service |
|
check-ach-worker |
float-service |
|
usio-syncer |
float-service |
|
api ( |
— |
|
check-ach-worker |
loc-service |
|
usio-syncer |
loc-service |
|
usio-syncer |
loc-service |
|
check-ach-worker |
loc-service |
|
usio-syncer |
loc-service |
|
api ( |
loc-service |
|
api (prenote endpoints) |
— |
|
check-ach-worker |
— |
|
jpm-webhook-processor, usio-syncer |
— |
|
usio-syncer, when the payment class cannot be determined |
— |
Source: pkg/dynamo/payments.go; PRENOTE_SUBMITTED in pkg/api/prenotes.go; refund types in pkg/api/refunds.go; safe-retry types in pkg/api/usio_safe_retry.go
Consumed
| Input | Source | Transport | Handled by |
|---|---|---|---|
Returned subscription and float debits |
This service (kinesis-feeder) |
Kinesis |
blocklist-handler — ACH dispatch |
JPM payment status callbacks |
JPM |
HTTPS |
jpm-webhook-handler — JPM Webhooks |
Prenote requests |
|
SQS |
prenoter — Prenotes |
Unblock requests |
No producer in this repository or the sibling service repositories |
SQS |
blocklist-remover — Unblock flow |
Debit card repair requests |
|
SQS |
debit-card-fixer — Debit Fixer |
Internal work queues (check-ach, usio-sync, usio-refresh, jpm-webhooks) are in Infrastructure.