Sepa transfers
Variable: sepaTransfers
const
sepaTransfers:object
=sepaTransfersNamespace.sepaTransfers
The sepaTransfers namespace contains all the functions related to SEPA transfer operations. It can be accessed like this:
Then, the sepaTransfers object contains the functions to perform SEPA transfer operations:
Type declaration
createSepaTransfer()
createSepaTransfer: (
createTransferParams
) =>Promise
<SepaTransfer
>
Creates a new SEPA transfer from the current user to a given beneficiary. Depending on the beneficiary’s trust status, this function will either create the transfer directly via API or open the UI to complete the SCA process.
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.
Returns
Promise
<SepaTransfer
>
A promise that resolves to the created SEPA transfer.
Throws
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
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
If the API request fails or returns an error.
Throws
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
An object with the sepaTransferId and the optional accessToken and stagingToken properties.
accessToken?
string
sepaTransferId
string
stagingToken?
string
Returns
Promise
<SepaTransfer
>
A promise that resolves to a SEPA transfer.
Throws
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
If the sepaTransferId
parameter is not a
string or is missing.
Throws
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
An optional object containing accessToken
and stagingToken
parameters. If the accessToken
is not provided, the
function will use the token previously passed to the initialize function. The
stagingToken
is optional, but it has to be passed to use the SDK in staging
environments (it will be ignored in production). This function also allows
managing pagination by passing the paginationSettings
property, 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
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
If the API request fails or returns an error.