Success response
When an operation completes successfully, the SDK returns a status object confirming that the card details have been tokenized and, if requested, the 3DS authentication has been attempted.Response object
| Field | Type | Description |
|---|---|---|
tokenized | Boolean | Indicates if the card was successfully vaulted/tokenized. |
authentication | Object | (Optional) Contains the results of the 3DS authentication flow. |
The authentication object
If authenticate: true was passed to the tokenize method, the authentication object contains the following fields:| Field | Type | Description |
|---|---|---|
transactionStatus | String | The 3DS status code (for example, “Y” for successful, “N” for failed/denied). |
attempted | Boolean | Indicates if a 3DS authentication was actually attempted. |
hasTimedOut | Boolean | Indicates if the 3DS flow timed out. |
hasCancelled | Boolean | Indicates if the user manually dismissed the challenge screen. |
type | String | The type of flow performed (for example, “frictionless” or “challenge”). |
Implementation examples
Error handling
Errors are categorized into two types:- SDK Failures (returned via the failure callback)
- Authentication Failures (status flags within a success response)
1. Authentication failures (inside success result)
Sometimes the SDK successfully communicates with the 3DS server, but the authentication itself is not “successful” (for example, the user fails the challenge or cancels). You should check theauthentication object even when the SDK returns a success result. If authentication was attempted but the user hasCancelled you
can retry vaulting, or proceed without 3DS.