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

    Maintain the account and beneficiary details for sending international wires via SWIFT network.

    Index

    Constructors

    Methods

    • Parameters

      • input: Input

      Returns Promise<
          | {
              error: | ServiceError<"DUPLICATE">
              | ServiceError<
                  | "IBAN_ACCOUNT_NUMBER_ROUTING_NUMBER_MISSING"
                  | "LOCAL_BANK_CODE_MISSING"
                  | "PROHIBITED_BENEFICIARY_COUNTRY"
                  | "PROHIBITED_BANK_COUNTRY"
                  | "PROHIBITED_INTERMEDIARY_BANK_COUNTRY"
                  | "INVALID_IBAN"
                  | "INVALID_BIC"
                  | "INVALID_IBAN_ROUTING_NUMBER"
                  | "INVALID_BSB_CODE"
                  | "INVALID_IFSC_CODE"
                  | "INVALID_INSTITUTION_TRANSIT_CODE"
                  | "INVALID_INTERMEDIARY_ROUTING_NUMBER",
              >
              | ServiceError<"INVALID_PHONE" | "INVALID_EMAIL" | "INVALID_ENTITY">;
              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: Bic;
                  iban?: string;
                  id: string;
                  intermediaryFinancialInstitution?: Bic;
                  intermediaryRoutingNumber?: string;
                  localAccountNumber?: string;
                  localBankCode?: 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: "SWIFT_WIRE";
                  updatedAt: Date;
                  verificationProfileId?: string;
              };
          },
      >

    • Parameters

      • input: {
            accountNumber?: string | null;
            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";
                };
            customerId: string;
            entityId: string;
            iban?: string
            | null;
            intermediaryRoutingNumber?: string | null;
            localAccountNumber?: string | null;
            localBankCode?: string | null;
            referenceId?: string | null;
            routingNumber?: string | null;
        } & { id: string }
        • OptionalaccountNumber?: string | null
        • 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";
              }
        • customerId: string
        • entityId: string
        • Optionaliban?: string | null
        • OptionalintermediaryRoutingNumber?: string | null

          Intermediary bank BIC/SWIFT code, if any

        • OptionallocalAccountNumber?: string | null

          The Local Account Number (e.g. Cuenta Cliente in Costa Rica) in the beneficiary's bank.

        • OptionallocalBankCode?: string | null

          Local Bank Code For Account Number (e.g. BSB for AU, IFSC for IN, NCC for EU, institution-transit (CRN) for CA)

        • OptionalreferenceId?: string | null
        • OptionalroutingNumber?: string | null

          BIC/SWIFT code

        • id: string

      Returns Promise<
          | {
              error: | ServiceError<"NOT_FOUND" | "DUPLICATE">
              | ServiceError<
                  | "IBAN_ACCOUNT_NUMBER_ROUTING_NUMBER_MISSING"
                  | "LOCAL_BANK_CODE_MISSING"
                  | "PROHIBITED_BENEFICIARY_COUNTRY"
                  | "PROHIBITED_BANK_COUNTRY"
                  | "PROHIBITED_INTERMEDIARY_BANK_COUNTRY"
                  | "INVALID_IBAN"
                  | "INVALID_BIC"
                  | "INVALID_IBAN_ROUTING_NUMBER"
                  | "INVALID_BSB_CODE"
                  | "INVALID_IFSC_CODE"
                  | "INVALID_INSTITUTION_TRANSIT_CODE"
                  | "INVALID_INTERMEDIARY_ROUTING_NUMBER",
              >
              | ServiceError<"INVALID_PHONE" | "INVALID_EMAIL" | "INVALID_ENTITY">;
              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: Bic;
                  iban?: string;
                  id: string;
                  intermediaryFinancialInstitution?: Bic;
                  intermediaryRoutingNumber?: string;
                  localAccountNumber?: string;
                  localBankCode?: 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: "SWIFT_WIRE";
                  updatedAt: Date;
                  verificationProfileId?: 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: Bic;
                  iban?: string;
                  id: string;
                  intermediaryFinancialInstitution?: Bic;
                  intermediaryRoutingNumber?: string;
                  localAccountNumber?: string;
                  localBankCode?: 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: "SWIFT_WIRE";
                  updatedAt: Date;
                  verificationProfileId?: string;
              };
          },
      >