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

    Class AchDebitDepositReconciliationService

    Index
    instance: (...args: []) => AchDebitDepositReconciliationService = ...

    The process default: built from each dependency's own instance().

    • Cancel an unsettled ACH deposit. A running workflow is the only writer of its status, so it is asked by update; with none running, the cancel is written here unless the mint already landed.

      Parameters

      • args: {
            bankTransactionId?: string;
            depositId: string;
            reason: string;
            returned?: boolean;
        }
        • OptionalbankTransactionId?: string

          The ACH return asking for the cancel, recorded on the CANCELLED transition.

        • depositId: string
        • reason: string
        • Optionalreturned?: boolean

          The caller holds proof the debit came back (an ACH return).

      Returns Promise<
          | { ok: true; value: { outcome: "CANCELLED" } }
          | {
              error:
                  | ServiceError<"DEPOSIT_NOT_FOUND">
                  | ServiceError<"NOT_ACH">
                  | ServiceError<
                      "DEPOSIT_NOT_ACTIONABLE",
                      {
                          status: | "PENDING"
                          | "CANCELLED"
                          | "PROCESSING"
                          | "COMPLETED"
                          | "RETURNED";
                      },
                  >
                  | ServiceError<"ALREADY_MINTED">
                  | ServiceError<"DEPOSIT_SETTLING">
                  | ServiceError<"DEBIT_IN_FLIGHT">
                  | ServiceError<"CANCEL_NOT_CONFIRMED">;
              ok: false;
          },
      >