Interface: OperationSettings
Optional settings to configure the SDK’s operations that will be performed after the initialization. This can be also provided when calling the operation functions themselves.Properties
accessToken?
Optional access token to use for the operation. If not provided, the SDK will use the access token set during initialization.optional
accessToken:string
debugMode?
Whether to enable debug mode for the SDK. If not provided, the SDK will default to false. If debug mode is enabled, it will print extra logging to the console during the execution of the SDK functions in which an iframe is involved.optional
debugMode:boolean
idempotencyKey?
Optional idempotency key to use for the operation. If not provided, the SDK will generate a random key for the functions that require it.optional
idempotencyKey:string
mfaPreference?
The Multifactor Authentication (MFA) preference to use for the operations. This can be eitheroptional
mfaPreference:string
MFA_METHODS.PASSKEY
, MFA_METHODS.PAIRED_DEVICE
or
MFA_METHODS.SMS_OTP
. If not provided, the SDK will default to ‘PASSKEY’.
paginationSettings?
Optional pagination settings to use for the operation. If the called function is not subject to pagination, this parameter will be ignored.optional
paginationSettings:PaginationSettings
proxyRequestFunction()?
optional
proxyRequestFunction: (operationPayload
) =>Promise
<string
>
proxyRequestFunction
is a mechanism to avoid operating with sensitive
information, like the access token and the staging token, in client side
environments. Using them in client side could lead to data leak.It works as
follows:
Qonto Embed exposes a proxy endpoint in its API that is capable of getting
requests prepared by the SDK. In your web application, you must implement a
backend endpoint that receives a string value in the body,
adds the access token in the Authentication
header and calls the Qonto
Embed proxy endpoint with the string payload you received. The proxyRequestFunction
the SDK expects is a function in which you will implement the call to your
backend endpoint. It receives a string parameter, it must perform a call to
your endpoint and return the data the endpoint sends you back.
The SDK will then decode the received data and return the appropriate return
value to the called function. Read more about implementing the whole flow in
the Proxy Endpoint Implementation guide.
Parameters
operationPayload
string
Returns
Promise
<string
>
stagingToken?
Optional staging token to use for the operation. The staging token is only needed when working in the staging environment, and it is irrelevant and not needed in production. If not provided, the SDK will use the staging token set during initialization.optional
stagingToken:string
uiParentElementId?
The id of the element where the SDK UI for sensitive operations will be rendered.optional
uiParentElementId:string