@cfxlabsinc/b2b-services
    Preparing search index...

    Type Alias RecurringFeeInvoice

    One customer's invoice for one billing period, with what the email system recorded about sending it and the charge that settled it.

    type RecurringFeeInvoice = {
        amount: BigNumber;
        billTo: {
            billingEmails: string[];
            contactLine: string | null;
            legalName: SelectCustomer["name"];
        };
        currency: SelectRecurringFeeInvoice["currency"];
        customerId: SelectCustomer["externalId"];
        customerName: SelectCustomer["name"];
        customerStatus: SelectCustomer["status"];
        delivered: boolean;
        delivery: | {
            outcome: SelectEmailDelivery["outcome"];
            reason: SelectEmailDelivery["reason"];
            recordedAt: SelectEmailDelivery["createdAt"];
            rejectedRecipients: SelectEmailDelivery["rejectedRecipients"];
        }
        | null;
        escalatedAt: SelectRecurringFeeInvoice["escalatedAt"];
        failedAttempts: RecurringFeeFailedAttempt[];
        feeStatus: StoredRecurringFee["status"]
        | null;
        feeTransfer:
            | {
                id: SelectFeeTransfer["externalId"];
                paidAt: Temporal.Instant
                | null;
                signature: string | null;
                status: FeeTransferStatus;
            }
            | null;
        id: SelectRecurringFeeInvoice["externalId"];
        issuedAt: SelectRecurringFeeInvoice["issuedAt"];
        lines: RecurringFeeInvoiceLine[];
        number: SelectRecurringFeeInvoice["number"];
        periodKey: SelectRecurringFeeInvoice["periodKey"];
        sourceAccountId: SelectLedgerAccount["externalId"];
        sourceAccountName: SelectLedgerAccount["name"];
        termsVersion: SelectRecurringFeeInvoice["termsVersion"];
        voidedAt: SelectRecurringFeeInvoice["voidedAt"];
        waivedAt: SelectRecurringFeeInvoice["waivedAt"];
    }
    Index
    amount: BigNumber

    The total. Equal to the sum of lines.

    billTo: {
        billingEmails: string[];
        contactLine: string | null;
        legalName: SelectCustomer["name"];
    }

    Legal name, contact line and billing emails, for the invoice's bill-to block.

    currency: SelectRecurringFeeInvoice["currency"]
    customerId: SelectCustomer["externalId"]
    customerName: SelectCustomer["name"]
    customerStatus: SelectCustomer["status"]
    delivered: boolean

    True once an attempt mailed the invoice at its current termsVersion.

    delivery:
        | {
            outcome: SelectEmailDelivery["outcome"];
            reason: SelectEmailDelivery["reason"];
            recordedAt: SelectEmailDelivery["createdAt"];
            rejectedRecipients: SelectEmailDelivery["rejectedRecipients"];
        }
        | null

    The newest email_delivery row for the invoice email; null until the lambda handles it.

    Type Declaration

    escalatedAt: SelectRecurringFeeInvoice["escalatedAt"]

    Set when the month reached the retry limit and ops was asked to chase it.

    failedAttempts: RecurringFeeFailedAttempt[]

    The month's FAILED charges, oldest first.

    feeStatus: StoredRecurringFee["status"] | null

    The customer's recurring fee now, not at issue; null once it is cleared.

    feeTransfer:
        | {
            id: SelectFeeTransfer["externalId"];
            paidAt: Temporal.Instant
            | null;
            signature: string | null;
            status: FeeTransferStatus;
        }
        | null

    Type Declaration

    id: SelectRecurringFeeInvoice["externalId"]
    issuedAt: SelectRecurringFeeInvoice["issuedAt"]

    Product, description, quantity, rate and amount, in position order.

    number: SelectRecurringFeeInvoice["number"]
    periodKey: SelectRecurringFeeInvoice["periodKey"]
    sourceAccountId: SelectLedgerAccount["externalId"]
    sourceAccountName: SelectLedgerAccount["name"]
    termsVersion: SelectRecurringFeeInvoice["termsVersion"]

    Which amount and account the email must show; see delivered.

    voidedAt: SelectRecurringFeeInvoice["voidedAt"]
    waivedAt: SelectRecurringFeeInvoice["waivedAt"]

    Set when an operator closed the month for good; see the runbook's waive.