Skip to main content
@qonto/embed-sdk / sepaTransfers

Variable: sepaTransfers

const sepaTransfers: object = sepaTransfersNamespace.sepaTransfers
The sepaTransfers namespace contains all the functions related to SEPA transfer operations, including both single and bulk transfers. It can be accessed like this:
import { sepaTransfers } from '@qonto/embed-sdk/sepa-transfers';
Then, the sepaTransfers object contains the functions to perform SEPA transfer operations:
// Single SEPA transfers
await sepaTransfers.getSepaTransfers();
await sepaTransfers.getSepaTransfer({ sepaTransferId: '...' });

// Bulk transfers are nested under sepaTransfers.bulkTransfers
const { bulkTransfers } = sepaTransfers;
await bulkTransfers.getBulkTransfers();

// Or access bulk transfers directly
await sepaTransfers.bulkTransfers.getBulkTransfers();
await sepaTransfers.bulkTransfers.getBulkTransfer({ bulkTransferId: '...' });

Type declaration

bulkTransfers

bulkTransfers: object

bulkTransfers.createBulkTransfer()

createBulkTransfer: (params) => AsyncGenerator<SingleBulkVopVerificationResult[], undefined | BulkTransfer>
Creates a new SEPA bulk transfer from the current user to one or more beneficiaries including a Verification of Payee (VoP) check first for each beneficiary. If the VoP check is responded with a rejection by the caller, the bulk transfer creation will be aborted. This function is implemented as an async generator to allow the caller to handle the VoP verification results before proceeding with the bulk transfer creation. The generator will yield VoP verification results for each unique beneficiary, and if the caller decides to proceed, it can call next() to continue the bulk transfer creation process. If the caller decides to abort the process, it can simply call next(VOP_DECISIONS.REJECT), and the generator will terminate without creating the bulk transfer.
Parameters
params
BulkTransferParams<NewBulkTransferWithBeneficiary> An object containing the settings for the bulk transfer, including:
  • bulkTransferSettings: An object that contains the mandatory bankAccountId and an array of bulkTransfers.
  • operationSettings: An object with operation-level settings such as accessToken, stagingToken, and other optional parameters. See BulkTransferParams. The operationSettings object must also include the uiParentElementId property. This has to specify the ID of the DOM element where the UI for MFA will be displayed. Note that this means that creating transfers can only happen in the client side. The createBulkTransfer function expects an idempotencyKey as well. If this property is not passed as part of operationSettings, a new one will be generated automatically. You can also specify an mfaPreference in the operationSettings to choose the multi-factor authentication method to use for the SCA flow (e.g., ‘passkey’, ‘sms-otp’, or ‘paired-device’). If not provided, the default MFA method will be used.
Returns
AsyncGenerator<SingleBulkVopVerificationResult[], undefined | BulkTransfer> As a yielded value, a promise that resolves to VoP check results for all unique beneficiaries.
Throws
AuthenticationError If the access token is invalid or missing. Ensure initialize has been called before using this function if you are not passing the access token.
Throws
InvalidParametersError If the bulkTransferSettings parameter is not an object or is missing, or if the required properties of the bulk transfer object are missing or invalid. Also thrown if uiParentElementId is not provided in the operationSettings, which is required for the iframe flow.
Throws
EmbedApiError If the API request fails or returns an error.
Throws
InvalidRuntimeError If the function is called in a non-browser environment. This operation can only be performed from a browser since it requires an iframe.

bulkTransfers.getBulkTransfer()

getBulkTransfer: (params) => Promise<BulkTransfer>
Fetches a specific SEPA bulk transfer by its ID.
Parameters
params
SepaTransferParams<GetBulkTransfer> An object containing:
  • sepaTransferSettings: An object that contains the mandatory bulkTransferId to identify the bulk transfer to retrieve.
  • operationSettings: An object with operation-level settings such as accessToken, stagingToken, and other optional parameters. See SepaTransferParams.
Returns
Promise<BulkTransfer> A promise that resolves to a BulkTransfer object containing details of the requested bulk transfer.
Throws
AuthenticationError If the access token is invalid or missing.
Throws
ValidationError If the provided parameters fail validation. Ensure initialize has been called before using this function if you are not passing the access token.
Throws
InvalidParametersError If the bulkTransferId parameter is not a string or missing.
Throws
EmbedApiError If the API request fails or returns an error.

bulkTransfers.getBulkTransfers()

getBulkTransfers: (getBulkTransfersParams?) => Promise<GetBulkTransfersResponse>
Fetches the list of SEPA bulk transfers for the current user.
Parameters
getBulkTransfersParams?
SepaTransferParams<never> An optional object containing operationSettings. The operationSettings object can include:
  • accessToken: If not provided, the function will use the token from initialize.
  • stagingToken: Optional, required only for staging environments.
  • paginationSettings: Optional object with page and itemsPerPage properties for pagination control.
Returns
Promise<GetBulkTransfersResponse> A promise that resolves to an object containing an array of bulk transfers and a meta object containing pagination state.
Throws
AuthenticationError If the access token is invalid or missing.
Throws
ValidationError If the provided parameters fail validation. Ensure initialize has been called before using this function if you are not passing the access token.
Throws
EmbedApiError If the API request fails or returns an error.

cancelSepaTransfer()

cancelSepaTransfer: (cancelSepaTransferParams) => Promise<void>
Cancels an existing SEPA transfer identified by the provided sepaTransferId.

Parameters

cancelSepaTransferParams
SepaTransferParams<CancelSepaTransferParams> An object with the parameters to cancel the transfer. If it was not provided when calling the SDK’s initialize function, an operationSettings object has to be passed too with the accessToken and stagingToken values.

Returns

Promise<void> A promise that resolves without return value.

Throws

AuthenticationError If the access token is invalid or missing. Ensure initialize has been called before using this function if you are not passing the access token.

Throws

InvalidParametersError If the sepaTransferId parameter is missing, or if the provided value is not a string.

Throws

EmbedApiError If the API request fails or returns an error.

createSepaTransfer()

createSepaTransfer: (createTransferParams) => AsyncGenerator<VopVerificationResult, undefined | SepaTransfer>
Creates a new SEPA transfer from the current user to a given beneficiary including a Verification of Payee (VoP) check first. If the VoP check is responded with an acceptance, and depending on the beneficiary’s trust status, this function will either create the transfer directly (if the beneficiary is trusted) via API or open the UI to complete the SCA process (if the beneficiary is not trusted). If the VoP check is responded with a rejection, the transfer creation will be aborted. This function is implemented as an async generator to allow the caller to handle the VoP verification result before proceeding with the transfer creation. The generator will yield the VoP verification result, and if the caller decides to proceed, it can call next(VOP_DECISIONS.ACCEPT) to continue the transfer creation process. If the caller decides to abort the process, it can simply call next(VOP_DECISIONS.REJECT), and the generator will terminate without creating the transfer. Once the transfer creation process is completed, the generator will return the created SEPA transfer.

Parameters

createTransferParams
SepaTransferParams<NewSepaTransfer> An object with the parameters to create the transfer. If it was not provided when calling the SDK’s initialize function, an operationSettings object has to be passed too with the accessToken and stagingToken values. If the transfer needs to be created for an untrusted beneficiary, the operationSettings object must also include the uiParentElementId property. This has to specify the ID of the DOM element where the UI for MFA will be displayed. Note that this means that creating transfers for untrusted beneficiaries can only happen in the client side. The createSepaTransfer function requires an idempotencyKey as well. If this property is not passed as part of operationSettings, a new one will be generated automatically. You can also specify an mfaPreference in the operationSettings to choose the multi-factor authentication method to use for the SCA flow (e.g., ‘passkey’, ‘sms-otp’, or ‘paired-device’). If not provided, the default MFA method will be used.

Returns

AsyncGenerator<VopVerificationResult, undefined | SepaTransfer> As the first yielded value, a promise that resolves to the VoP check result.

Throws

AuthenticationError If the access token is invalid or missing. Ensure initialize has been called before using this function if you are not passing the access token.

Throws

InvalidParametersError If the transfer parameter is not an object or is missing, or if the required properties of the transfer object are missing or invalid.

Throws

EmbedApiError If the API request fails or returns an error.

Throws

InvalidRuntimeError If a transfer for an untrusted beneficiary is attempted to be created in the server. This scenario requires to be performed from a browser.

getSepaTransfer()

getSepaTransfer: (Object) => Promise<SepaTransfer>
Fetches a single SEPA transfer of the current user by ID.

Parameters

Object
SepaTransferParams<GetSepaTransfer> An object with the sepaTransferId and the optional accessToken and stagingToken properties.

Returns

Promise<SepaTransfer> A promise that resolves to a SEPA transfer.

Throws

AuthenticationError If the access token is invalid or missing. Ensure initialize has been called before using this function if you are not passing the access token.

Throws

InvalidParametersError If the sepaTransferId parameter is not a string or is missing.

Throws

EmbedApiError If the API request fails or returns an error.

getSepaTransfers()

getSepaTransfers: (getSepaTransfersParams?) => Promise<GetSepaTransfersResponse>
Fetches the list of SEPA transfers for the current user.

Parameters

getSepaTransfersParams?
SepaTransferParams<never> An object containing:
  • operationSettings: An object with operation-level settings such as proxyRequestFunction (preferred over using the access token flow), accessToken, stagingToken, mfaPreference, and other optional parameters. This function also allows managing pagination by passing the paginationSettings property under operationSettings, which accepts an object with the page and itemsPerPage properties.

Returns

Promise<GetSepaTransfersResponse> A promise that resolves to an object containing an array of SEPA transfers and a meta object containing pagination state.

Throws

InvalidParametersError If any of the values provided under operationSettings is invalid.

Throws

AuthenticationError If both the proxyRequestFunction and accessToken are invalid or missing within operationSettings.

Throws

EmbedApiError If the API request fails or returns an error.