Events

Event contracts for the Subscription Service: what it publishes and what it consumes. Flow behavior lives on the domain pages linked from each row.

Published Events

subscription-updated (Kinesis)

Published to the site-subscriptions Kinesis stream by the kinesis-feeder Lambda, triggered by the DynamoDB Stream on billing-activity. Every INSERT or MODIFY record is forwarded as a wrapped FMSDK event; REMOVE records are skipped.

Field Value

Stream

site-subscriptions

Event source / version

SubscriptionService / V1

Event type

subscription-updated, or the record’s updated_event value when set (e.g. PENDING_CANCELLATION)

Payload

Full SubscriptionResponse from the DynamoDB new image: subscription_id, user_id, subscription_date, subscription_period, subscription_status, subscription_amount, term, process, transaction_id, usio_error, initial_run_date, last_run_date, completion_date, created_date, updated_event, is_pending_downgrade

usio_error carries a block reason instead of a processor error code when a pinless submit was blocked (Retry-Limit Blocks).

Downstream consumers subscribe to the stream independently; the Subscription Service does not manage them.

Notification and attribution events

Event Emitted by Destination Trigger

subscription-ach-digital-receipt

ach-handler

Segment

SUBSCRIPTION_COMPLETED — receipt with amount, payment type, mask, days past due, billing group (ACH Callbacks)

user_subscription_payment_failed

ach-handler

Iterable

SUBSCRIPTION_RETURNED — frequency, amount, membership_tier, due_date, payment_type ACH, mask, reason ACH_FAILED, billing_group, billing_week

ad_subscription_payment_completed

ach-handler

AppsFlyer

SUBSCRIPTION_COMPLETED — revenue, currency USD, membership_tier, payment_type, subscription_date, process

ad_subscription_payment_failed

ach-handler

AppsFlyer

SUBSCRIPTION_RETURNED — membership_tier, payment_type, subscription_date, reason, return_code, process

three_day_notification

notifier-worker

Iterable

Billing date in the three-day window — user_id, billing_date MM/DD/YYYY, amount, membership_tier, account mask (Notifications)

AppsFlyer events are dispatched per mobile platform (separate iOS and Android clients) and silently dropped when the user has no appsflyer_id. Iterable events are keyed by the user’s email.

Consumed Events

Source Transport Handled by Contract

User Service membership lifecycle events

Kinesis site-user-service-users (filtered)

memberships

Routed by event_type — handled types and actions: Memberships

Payments Service ACH callbacks (SUBSCRIPTION_COMPLETED / _RETURNED / _REFUNDED / _CHARGED_BACK)

Kinesis site-payments (4-type filter)

ach-handler

Event → status mapping: ACH Callbacks

Transactions Service balance-detected events

EventBridge site-subscription-service-balance-detected → SQS site-subscription-service-balance-event-tap

webhook-balance-worker

Balance-triggered collection: Webhook Balance Collection