Getting Started

Getting Started with VGS Collect React Native SDK

Before you start, you can also check @vgs/collect-react-native GitHub Page and Example Application.

How to Integrate the SDK

Quickstart from Dashboard

You should have your organization registered at VGS Dashboard. A Sandbox Vault will be pre-created for you. Use your VGS Dashboard to start collecting data, then follow the VGSCollectSDK integration guide below.

Integrate VGSCollectSDK into your React Native Project

Step 1: Install the SDK

VGS Collect SDK is distributed through npm.

Install the @vgs/collect-react-native package using npm or yarn:


npm install @vgs/collect-react-native
    

yarn add @vgs/collect-react-native

Ensure you have React Native set up in your project. If not, follow the React Native Getting Started guide.

Next

Follow the steps below to build a simple form that collects credit card data and submits it securely to your Vault.

Step 2: Configure Your App

Import the SDK Components:

To initialize VGSCollect instance you need to set your Vault id and Environment type.

Initialize VGSCollect:

  • You can have multiple VGSCollect instances; they will work independently with the fields you configure for each specific instance. - All VGSCollect instances can be configured differently.

There are two steps in the integration process:

  • Configuring VGS Collect UI components

  • Sending data to VGS

Configure UI Components

Create UI Form with VGS Input components

VGS Collect UI inputs have pre-defined configurations, such as validation and masking. To use a pre-defined configuration, you should use the type field. Available types are described in VGSInputType. More information about VGS Collect UI components is described here.

Setup styles attributes

Securely collecting and sending information

Use vgsCollect.submit(_:) to collect data from VGS Collect UI components and save it to your secure Vault. You can find additional information on how to send data to your Vault here.

Check next

Last updated