threeDSFingerprint
const threeDSFingerprint: (options) => Promise<ThreeDSFrameResult>;
Runs a 3DS device-fingerprinting step in a hidden iframe: the EMVCo 3DS Method, or any provider's equivalent device-data collection.
Fingerprinting is best-effort. It exists to give the ACS more device data so it challenges less
often, and it is never a gate: a timeout, an unreachable endpoint or a blocked iframe are all
absorbed here and reported as a status, so a payment is never blocked by this call. Whether the
data actually reached the 3DS server is only known server-side — the signal this returns is a
timing signal, telling you it is time to proceed with the authentication.
Parameters
| Parameter | Type |
|---|---|
options | ThreeDSFingerprintOptions |
Returns
Promise<ThreeDSFrameResult>
Always resolves. status is completed, timeout or aborted.
Throws
SdkError If the input is invalid (never for a failed or slow fingerprint). Possible errors include:
| Error Code |
|---|
| THREEDS_INVALID_URL |
| THREEDS_INVALID_INPUT |
| CONTAINER_NOT_FOUND |
Examples
EMVCo 3DS Method, from the versioning response
const { status } = await threeDSFingerprint({
threeDSMethodUrl,
threeDSMethodData,
});
// proceed with the authentication whatever `status` is
A provider that reports collection over postMessage
await threeDSFingerprint({
url: deviceDataCollectionUrl,
fields: { JWT: accessToken },
completion: {
origins: ['https://centinelapi.cardinalcommerce.com'],
match: (data) => (data as { MessageType?: string }).MessageType === 'profile.completed',
},
});