Skip to content

Account.swept

Emitted each time an Account is swept.

Account.sweep emits Account.swept when it completes on an Account.

PropertyValue
Emitted byAccount.sweep
NounAccount
WakesNone.

Payload

Each delivery is an Event record. data holds what Account.sweep returns.

FieldTypeRequiredDescription
namestringrequiredAccount.swept.
atdatetimerequiredWhen it happened.
seqintegerIts position in the namespace, one more than the Event before; any seq is a cursor into the history.
datajsonrequiredThe Thing as the Action left it.
data.accountAccountrequiredThe to Account, with the money landed.
data.account.classstringrequiredOne of cash, asset, receivable, liability, equity, revenue, or expense.
data.account.heldAtstringOne of payments, cards, treasury, bank, or company (a share of the holding Company’s cash): where a cash Account is held.
data.account.balancemoneyComputed on read from Entries; never stored.
data.account.pendingmoneyComputed: money on its way in that has not settled yet.
data.account.payoutSchedulestringOne of daily, weekly, monthly, or manual: when the payments balance pays out.
data.transactionTransactionrequiredThe move, reconciled on both Accounts.

Example

JSON
{
  "$id": "https://api.sb/routewise.dev/events/event_1",
  "$type": "Event",
  "name": "Account.swept",
  "at": "2026-10-22T12:00:00Z",
  "data": {
    "account": {
      "$id": "https://api.sb/routewise.dev/accounts/account_1",
      "$type": "Account",
      "class": "cash",
      "heldAt": "payments",
      "balance": {
        "amount": 25,
        "currency": "USD"
      },
      "pending": {
        "amount": 25,
        "currency": "USD"
      },
      "payoutSchedule": "daily"
    },
    "transaction": {
      "$id": "https://api.sb/routewise.dev/transactions/transaction_1",
      "$type": "Transaction",
      "kind": "charge",
      "amount": {
        "amount": 25,
        "currency": "USD"
      }
    }
  },
  "seq": 1
}