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

    Reconciles a pending redemption against a posted bank transaction: validates amounts, commits the redemption workflow, and records the reconciliation on the bank transaction.

    Lives in withdrawal-services (not redemption-services) because the logic requires BankTransactionService, and a direct dependency from redemption-services onto bank-transaction-services would close a package cycle via virtual-account-services.

    Index

    Constructors

    Methods

    • Parameters

      • args: { bankTransactionId: string; redemptionId: string }

      Returns Promise<
          | { ok: true; value: void }
          | {
              error:
                  | ServiceError<"REDEMPTION_NOT_FOUND", { redemptionId: string }>
                  | ServiceError<"REDEMPTION_NOT_PENDING", { redemptionId: string }>
                  | ServiceError<"INVALID_BANK_TX", { bankTransactionId: string }>
                  | ServiceError<
                      "AMOUNT_MISMATCH",
                      { bankTransactionAmount: string; redemptionAmount: string },
                  >;
              ok: false;
          },
      >