Skip to main content
The Gr4vy native SDKs provide a standardized way to handle the results of vaulting and 3DS authentication operations across iOS and Android.

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

The authentication object

If authenticate: true was passed to the tokenize method, the authentication object contains the following fields:

Implementation examples

Error handling

Errors are categorized into two types:
  1. SDK Failures (returned via the failure callback)
  2. 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 the authentication 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.

2. SDK failure types (failure callback)

These errors occur when the SDK cannot complete the request due to configuration, network, or validation issues. Please see the generic guides on how to handle these errors in Swift and Kotlin.