@cfxlabsinc/b2b-services
    Preparing search index...
    type Transaction = {
        accountId: string | null;
        accountName: string | null;
        accountRef: string | null;
        amount: BigNumber;
        bankId?: BankId;
        bankName?: string | null;
        bankTransactionId?: string;
        card?: {
            cardholderFirstName?: string;
            cardholderLastName?: string;
            id: string;
            last4?: string;
            merchantName?: string;
            transactionType?: "AUTHORIZATION" | "REVERSAL" | "REFUND" | "ADJUSTMENT";
        };
        cardLabel: string
        | null;
        counterparty?: {
            address?: string;
            customer?: { id: string; name: string };
            identityId?: string;
            ledgerAccountId?: string;
            organizationId?: string;
            phone?: string;
            walletAddress?: Address;
        };
        counterpartyDescription: string
        | null;
        counterpartyName: string | null;
        createdAt: Date;
        currency: string;
        customerName: string;
        dataSource:
            | "deposit"
            | "manual_mint"
            | "withdrawal"
            | "swap"
            | "transfer"
            | "network_transfer"
            | "fee_transfer"
            | "redemption"
            | "card"
            | "escrow_transfer"
            | "reward"
            | "blockchain_deposit"
            | "blockchain_withdrawal"
            | "ledger_account_withdrawal";
        description: string
        | null;
        deviceLocation?: { lat: number; long: number };
        entityEmail: string | null;
        entityId: string;
        entityName: string | null;
        entityType: "IDENTITY" | "ORGANIZATION" | null;
        entityTypeDescription: string | null;
        failureReason: string | null;
        fees?: BigNumber;
        id: string;
        impliedRate: string | null;
        key: string;
        method:
            | "ACH_CREDIT"
            | "ACH_DEBIT"
            | "AF_BANK"
            | "AF_MOMO"
            | "BLOCKCHAIN"
            | "CASH"
            | "CFX_NETWORK"
            | "DEPOSIT"
            | "ESCROW"
            | "FEDWIRE"
            | "FEDWIRE_DRAWDOWN"
            | "FEDNOW"
            | "RTP"
            | "INSTANT"
            | "SPEI"
            | "DEBIT_CARD"
            | "REWARD"
            | "SWAP"
            | "SWIFT"
            | "TRANSFER"
            | "VIRTUAL_CARD"
            | "WITHDRAWAL";
        methodColumnLabel: string;
        methodDescription: string;
        organizationId: string
        | null;
        outcome: "succeeded" | "pending" | "failed";
        paymentInstrumentId?: string;
        personId: string | null;
        postBalance?: BigNumber;
        preBalance?: BigNumber;
        productQuoteId?: string;
        railFamily: "ACH" | "WIRE" | "RTP" | null;
        rewardKind: "credit" | "claim" | "accountDebit" | null;
        signature: string | null;
        signedAmount: BigNumber;
        sourceAmount?: BigNumber;
        sourceCurrency?: string;
        status:
            | "PENDING"
            | "PROCESSING"
            | "COMPLETED"
            | "FAILED"
            | "RETURNED"
            | "CANCELLED";
        statusDescription: string;
        subType?: | "RETURN"
        | "FEE"
        | "ADJUSTMENT"
        | "POINTS"
        | "LEDGER_ACCOUNT"
        | "PLATFORM_SETTLEMENT"
        | "DEPOSIT";
        subTypeDescription?: string;
        targetAmount?: BigNumber;
        targetCurrency?: string;
        type: "CREDIT"
        | "DEBIT";
        typeDescription: string;
        updatedAt: Date;
        walletAddress: Address | null;
    }
    Index
    accountId: string | null

    External ID (acc_…) of the ledger account at walletAddress. Null when the wallet has no ledger_account row. Stable identifier for downstream integrations; consumers should prefer this over walletAddress when exposing an account reference.

    accountName: string | null

    Display name of the ledger account at walletAddress. Null when the wallet has no ledger_account row.

    accountRef: string | null

    accountId, else walletAddress.

    amount: BigNumber

    Currency amount, including fees, that were eventually debited from/credited to the account

    bankId?: BankId
    bankName?: string | null

    Display name of the bank at bankId: the bank row's name, else the slug title-cased in SQL ("green_dot" reads "Green Dot"). Null without a bankId.

    bankTransactionId?: string
    card?: {
        cardholderFirstName?: string;
        cardholderLastName?: string;
        id: string;
        last4?: string;
        merchantName?: string;
        transactionType?: "AUTHORIZATION" | "REVERSAL" | "REFUND" | "ADJUSTMENT";
    }

    Card for VIRTUAL_CARD, undefined otherwise.

    cardLabel: string | null

    "Jane D. ••1234" on a card row, or methodDescription without a cardholder; null off cards.

    counterparty?: {
        address?: string;
        customer?: { id: string; name: string };
        identityId?: string;
        ledgerAccountId?: string;
        organizationId?: string;
        phone?: string;
        walletAddress?: Address;
    }

    The other side of the transaction, as far as it resolves; absent when none of it does. customer is the customer whose ledger account is the other leg. address is a postal address; walletAddress is the other side's wallet, in full. identityId and organizationId are external ids.

    counterpartyDescription: string | null

    The to/from text a table cell shows, written by each view arm: "From John Doe", "To Platform", "{short} SOL", "Fee from {payer}", "Phone transfer to {phone}", "Return {id}", "Not available". Null on a row read from b2b.transaction, which has no such column.

    counterpartyName: string | null

    The counterparty's name, and only a name: its identity, then its organization, then (within one customer) its ledger account, then its customer, then the payment instrument's beneficiary, then the sender a deposit's rail reported. Never a wallet address, a phone or a merchant; those are counterparty.walletAddress, counterparty.phone and card.merchantName. A FEE debit carries the name of the customer that collected the fee, and no instrument's beneficiary. Null when the other side has no name, and on a withdrawal's RETURN credit.

    createdAt: Date
    currency: string

    ISO currency code

    customerName: string

    Display name of the customer (CFX customer) at customerId, or customerId when it has none. Resolved in SQL from customer.name.

    dataSource:
        | "deposit"
        | "manual_mint"
        | "withdrawal"
        | "swap"
        | "transfer"
        | "network_transfer"
        | "fee_transfer"
        | "redemption"
        | "card"
        | "escrow_transfer"
        | "reward"
        | "blockchain_deposit"
        | "blockchain_withdrawal"
        | "ledger_account_withdrawal"

    The record this row was built from — one value per *_transaction_view arm, each its view name minus the suffix. What distinguishes the arms now that Transaction.method names only the rail and five rails run both ways. Internal: transaction-api never exposes it.

    description: string | null

    The leg's fixed label: "Deposit", "Withdrawal", "Transfer", "Phone transfer", "Fee", "Platform", "Return", "Card payment", "Currency exchange", "Blockchain transfer", "Reward claim payout". A reward account's own movement carries its stored note instead, or "Reward".

    deviceLocation?: { lat: number; long: number }

    Approximate user device location (IP-derived) at the time the originating quote was created. Populated for deposits and withdrawals that captured a deviceLocation on the creating request; undefined for all other transaction types.

    entityEmail: string | null

    Email of the entity if it's an IDENTITY. Null for organizations and for unresolved entities.

    entityId: string
    entityName: string | null

    Display name of the entity (identity or organization) that owns this row, or entityId when it has none. Null only when the row has no entity at all.

    entityType: "IDENTITY" | "ORGANIZATION" | null

    Discriminator for the entity at entityId — IDENTITY (a specific person), ORGANIZATION, or null when the entity isn't directly resolvable.

    entityTypeDescription: string | null
    failureReason: string | null

    Operator-entered reason recorded when a transaction was manually cancelled or failed (the latest FAILED / RETURNED / CANCELLED status transition's data.reason). Only deposit / withdrawal / ledger-transfer rails capture one; null for every other rail and for transitions with no reason.

    fees?: BigNumber

    Total fees taken, in sourceCurrency. Sourced from product_quote.total_fees. May be undefined for LEGACY product_quote rows (older transactions where fee breakdowns weren't recoverable).

    id: string

    Not necessarily unique, e.g. transfers will appear as credit and debit transactions with the same ID.

    impliedRate: string | null

    targetAmount ÷ sourceAmount to 4 decimals; null without a positive source and a target.

    key: string

    Unique row identity: concat_ws('-', id, type, subType) — id-type for a main leg (NULL subType) and id-type-FEE / id-type-CLEARING / etc. for a sub-row. Unlike Transaction.id this uniquely identifies a single read-model row — it matches the (id, type, subType) tuple get() leg-pins on and the admin-dashboard's transactionRowKey. Deliberately excludes createdAt: it is stable identity, not a cursor.

    method:
        | "ACH_CREDIT"
        | "ACH_DEBIT"
        | "AF_BANK"
        | "AF_MOMO"
        | "BLOCKCHAIN"
        | "CASH"
        | "CFX_NETWORK"
        | "DEPOSIT"
        | "ESCROW"
        | "FEDWIRE"
        | "FEDWIRE_DRAWDOWN"
        | "FEDNOW"
        | "RTP"
        | "INSTANT"
        | "SPEI"
        | "DEBIT_CARD"
        | "REWARD"
        | "SWAP"
        | "SWIFT"
        | "TRANSFER"
        | "VIRTUAL_CARD"
        | "WITHDRAWAL"

    The rail, with no direction in the name — Transaction.type carries that. A rail that runs both ways therefore has ONE method: ACH_DEBIT is a customer's ACH deposit and an ACH debit withdrawal, FEDWIRE a wire in and a wire out.

    methodColumnLabel: string

    The Method column's text: "Fee", "Return" on a returned credit, else methodDescription.

    methodDescription: string
    organizationId: string | null

    entityId when entityType is ORGANIZATION.

    outcome: "succeeded" | "pending" | "failed"

    COMPLETED is succeeded; PENDING or PROCESSING is pending; anything else failed.

    paymentInstrumentId?: string

    Source payment instrument ID for DEPOSIT_* and target payment instrument ID for WITHDRAW_*. Undefined otherwise.

    personId: string | null

    entityId when entityType is IDENTITY.

    postBalance?: BigNumber

    MOVEUSD token balance after the on-chain transaction (from wallet_account_transaction).

    preBalance?: BigNumber

    MOVEUSD token balance before the on-chain transaction (from wallet_account_transaction).

    productQuoteId?: string

    External id (pq_...) of the product_quote audit row that priced this transaction. Present for deposit/withdrawal/swap; undefined for card/transfer/blockchainDeposit/redemption/feeTransfer/manualMint.

    railFamily: "ACH" | "WIRE" | "RTP" | null

    The rail group Dart's reports file a row under; null off those rails.

    rewardKind: "credit" | "claim" | "accountDebit" | null

    On a reward row: a credit, a claim that settled on-chain, or a plain accountDebit.

    signature: string | null
    signedAmount: BigNumber

    amount, negated on a DEBIT.

    sourceAmount?: BigNumber

    Gross amount the originator put in, in sourceCurrency. Sourced from product_quote.source_amount. Undefined for non-quoted transaction kinds.

    sourceCurrency?: string
    status:
        | "PENDING"
        | "PROCESSING"
        | "COMPLETED"
        | "FAILED"
        | "RETURNED"
        | "CANCELLED"

    Stored status, passed straight through by every arm (20261028151410).

    statusDescription: string
    subType?:
        | "RETURN"
        | "FEE"
        | "ADJUSTMENT"
        | "POINTS"
        | "LEDGER_ACCOUNT"
        | "PLATFORM_SETTLEMENT"
        | "DEPOSIT"

    What kind of leg this is within its movement, when the rail alone does not say. ADJUSTMENT is the card over/under-clearing delta, signed per audience and matching the row's own cardTransactionType. POINTS is a reward account's own off-chain movement, which never touches a wallet — the on-chain payout that settles it is the bare row, since that is ordinary money leaving a ledger account. Both were CLEARING until 20260919161200, where one name covered the card delta and a reward payout. DEPOSIT is a deposit-sourced swap's landing, the credit of what arrived before the swap converts it.

    subTypeDescription?: string
    targetAmount?: BigNumber

    Net amount the recipient gets, in targetCurrency. Sourced from product_quote.target_amount_after_fees. Undefined for non-quoted kinds.

    targetCurrency?: string
    type: "CREDIT" | "DEBIT"
    typeDescription: string
    updatedAt: Date
    walletAddress: Address | null

    The primary wallet for transaction

    • Deposit: the wallet that is credited
    • Withdrawal, redemption: the wallet that is debited
    • Transfer (debit): the wallet that was debited
    • Transfer (credit): the wallet that was credited

    Null for off-chain transaction types that never touch a wallet (e.g. REWARD, which moves balance on the reward ledger, not on-chain).