Installation
The official Gr4vy mobile SDKs are available for both iOS and Android platforms. Add them to your project to get started.- Swift (iOS)
- Kotlin (Android)
The official Gr4vy Swift SDK is available via Swift Package Manager.
- In Xcode, select File -> Add Packages
- Enter the repository URL: https://github.com/gr4vy/gr4vy-swift
- Select the version or branch you wish to use.
The vaulting flow
Initialize Checkout Session
Create a checkout session on your backend with the transaction details to store the vaulted card data.
Initialize the SDK
Initialize the SDK with your Gr4vy ID, then use your own native UI components to collect the card number, expiry date, and CVV.
Vault via SDK
Pass the collected card data and checkout session ID to the native SDK to securely vault the card without 3DS authentication.
Implementation
1. Initialize Checkout Session
First, create a checkout session on your backend. This session stores the vaulted card data.2. Initialize the SDK
In your mobile app, initialize the SDK with your Gr4vy ID and the correct environment. Then use your own UI components to collect the card number, expiry date, and CVV.3. Vault via SDK
Use thetokenize method to send the card details to Gr4vy. In this basic flow, set the authenticate parameter to false to skip the 3DS process.
4. Process payment
Once the SDK returns a success result, your backend can use thatcheckout_session_id to create a transaction. Since 3DS was skipped, this can be processed as a standard non-3DS transaction.