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

    Maintain the account and beneficiary details for sending US wires via Fedwire network.

    Index

    Constructors

    Methods

    • Parameters

      • input: Input

      Returns Promise<
          | {
              error: | ServiceError<"DUPLICATE">
              | ServiceError<
                  | "INVALID_PHONE"
                  | "INVALID_EMAIL"
                  | "INVALID_ENTITY"
                  | "INVALID_ADDRESS_COUNTRY"
                  | "INVALID_ADDRESS_REGION"
                  | "INVALID_ADDRESS_ZIP_CODE",
              >;
              ok: false;
          }
          | {
              ok: true;
              value: {
                  accountNumber: string;
                  beneficiary: {
                      address: {
                          city: string;
                          countryCode: string;
                          line1: string;
                          line2?: string;
                          postalCode: string;
                          region?: string;
                      };
                      email?: string;
                      phone?: string;
                      reference?: string;
                  } & (
                      | { name: string; type: "BUSINESS" }
                      | {
                          firstName: string;
                          lastName: string;
                          middleName?: string;
                          type: "PERSON";
                      }
                  );
                  createdAt: Date;
                  deletedAt: Date
                  | null;
                  financialInstitution: {
                      address: {
                          city: string;
                          line1: string;
                          postalCode: string;
                          state: string;
                      };
                      name: string;
                  };
                  id: string;
                  provider: | "REDEMPTION"
                  | "SOLANA"
                  | "MX_CLABE"
                  | "WIRE_DEPOSIT"
                  | "ACH_PUSH_DEPOSIT"
                  | "YELLOWCARD"
                  | "QUILTT"
                  | "VICTOR"
                  | "CFX"
                  | "ETHEREUM"
                  | "BASE";
                  providerId: string;
                  referenceId?: string;
                  routingNumber: string;
                  status: "ACTIVE"
                  | "PENDING_VERIFICATION"
                  | "BLOCKED"
                  | "DELETED";
                  type: "US_WIRE";
                  updatedAt: Date;
                  verificationProfileId?: string;
                  victorCounterpartyId?: string;
              };
          },
      >

    • Parameters

      • input: Omit<Input, "referenceId" | "beneficiary"> & {
            beneficiary:
                | {
                    address: {
                        city: string;
                        countryCode: string;
                        line1: string;
                        line2?: string
                        | null;
                        postalCode: string;
                        region?: string | null;
                    };
                    email?: string
                    | null;
                    name: string;
                    phone?: string | null;
                    reference?: string | null;
                    type: "BUSINESS";
                }
                | {
                    address: {
                        city: string;
                        countryCode: string;
                        line1: string;
                        line2?: string
                        | null;
                        postalCode: string;
                        region?: string | null;
                    };
                    email?: string
                    | null;
                    firstName: string;
                    lastName: string;
                    middleName?: string | null;
                    phone?: string | null;
                    reference?: string | null;
                    type: "PERSON";
                };
            id: string;
            referenceId?: string
            | null;
        }

      Returns Promise<
          | {
              error: | ServiceError<"NOT_FOUND" | "DUPLICATE">
              | ServiceError<
                  | "INVALID_PHONE"
                  | "INVALID_EMAIL"
                  | "INVALID_ENTITY"
                  | "INVALID_ADDRESS_COUNTRY"
                  | "INVALID_ADDRESS_REGION"
                  | "INVALID_ADDRESS_ZIP_CODE",
              >;
              ok: false;
          }
          | {
              ok: true;
              value: {
                  accountNumber: string;
                  beneficiary: {
                      address: {
                          city: string;
                          countryCode: string;
                          line1: string;
                          line2?: string;
                          postalCode: string;
                          region?: string;
                      };
                      email?: string;
                      phone?: string;
                      reference?: string;
                  } & (
                      | { name: string; type: "BUSINESS" }
                      | {
                          firstName: string;
                          lastName: string;
                          middleName?: string;
                          type: "PERSON";
                      }
                  );
                  createdAt: Date;
                  deletedAt: Date
                  | null;
                  financialInstitution: {
                      address: {
                          city: string;
                          line1: string;
                          postalCode: string;
                          state: string;
                      };
                      name: string;
                  };
                  id: string;
                  provider: | "REDEMPTION"
                  | "SOLANA"
                  | "MX_CLABE"
                  | "WIRE_DEPOSIT"
                  | "ACH_PUSH_DEPOSIT"
                  | "YELLOWCARD"
                  | "QUILTT"
                  | "VICTOR"
                  | "CFX"
                  | "ETHEREUM"
                  | "BASE";
                  providerId: string;
                  referenceId?: string;
                  routingNumber: string;
                  status: "ACTIVE"
                  | "PENDING_VERIFICATION"
                  | "BLOCKED"
                  | "DELETED";
                  type: "US_WIRE";
                  updatedAt: Date;
                  verificationProfileId?: string;
                  victorCounterpartyId?: string;
              };
          },
      >

    • Upserts currently-persisted beneficiary into AiPrise and runs a verification

      Parameters

      • input: { customerId: string; entityId: string; id: string }

      Returns Promise<
          | { error: ServiceError; ok: false }
          | {
              ok: true;
              value: {
                  accountNumber: string;
                  beneficiary: {
                      address: {
                          city: string;
                          countryCode: string;
                          line1: string;
                          line2?: string;
                          postalCode: string;
                          region?: string;
                      };
                      email?: string;
                      phone?: string;
                      reference?: string;
                  } & (
                      | { name: string; type: "BUSINESS" }
                      | {
                          firstName: string;
                          lastName: string;
                          middleName?: string;
                          type: "PERSON";
                      }
                  );
                  createdAt: Date;
                  deletedAt: Date
                  | null;
                  financialInstitution: {
                      address: {
                          city: string;
                          line1: string;
                          postalCode: string;
                          state: string;
                      };
                      name: string;
                  };
                  id: string;
                  provider: | "REDEMPTION"
                  | "SOLANA"
                  | "MX_CLABE"
                  | "WIRE_DEPOSIT"
                  | "ACH_PUSH_DEPOSIT"
                  | "YELLOWCARD"
                  | "QUILTT"
                  | "VICTOR"
                  | "CFX"
                  | "ETHEREUM"
                  | "BASE";
                  providerId: string;
                  referenceId?: string;
                  routingNumber: string;
                  status: "ACTIVE"
                  | "PENDING_VERIFICATION"
                  | "BLOCKED"
                  | "DELETED";
                  type: "US_WIRE";
                  updatedAt: Date;
                  verificationProfileId?: string;
                  victorCounterpartyId?: string;
              };
          },
      >