**Last updated**: 20 November 2025 | [**Change log**](/products/checkout/react-native/changelog/) # Create sessions to pay with a card and CVC Enterprise Use our React Native SDK to secure your customer's payment details by creating separate sessions for the card details and CVC. Full sample integration You can see an example of the session generation [here](https://github.com/Worldpay/access-checkout-react-native/tree/v4.0.1/demo-app). ## Set your views As part of our SDK, we provide the `AccessCheckoutTextInput` UI component dedicated to capturing your customer’s card details to minimize your exposure to PCI data, allowing you to qualify for the lowest level of PCI compliance. When you create your checkout form, you must use this component, add the views that your customers use to enter and submit their card details, and set unique identifiers for each of them. You must do this by defining the `nativeID` property for each field. Here's an example of how you would set your view configurations. JavaScript import React from 'react'; import {View} from 'react-native'; import {AccessCheckoutTextInput} from '@worldpay/access-worldpay-checkout-react-native-sdk'; export default function CardFlow() { return ( ); } TypeScript import React from 'react'; import {View} from 'react-native'; import {AccessCheckoutTextInput} from '@worldpay/access-worldpay-checkout-react-native-sdk'; export default function CardFlow() { return ( ); } ## Validate card details You can optionally validate your customer's card details. You can find instructions [here](/products/checkout/react-native/card-validator). ## Create CARD session and CVC session ### Initialize the useAccessCheckout hook You must first configure the `useAccessCheckout` hook by providing your `baseUrl`, `checkoutId` and the identifiers which you defined as the `nativeID` property in the previous step within the `AccessCheckoutTextInput` components. You must provide this configuration using the helper hook `useCardConfig`. Here's an example of how to initialize it. import { //... useAccessCheckout, useCardConfig } from '@worldpay/access-worldpay-checkout-react-native-sdk'; export default function CardFlow() { const {generateSessions} = useAccessCheckout({ baseUrl: 'https://try.access.worldpay.com', checkoutId: 'YOUR_CHECKOUT_ID', config: useCardConfig({ panId: 'panInput', expiryDateId: 'expiryDateInput', cvcId: 'cvcInput' }), }); } ### Parameters | Parameter | Description | | --- | --- | | `baseUrl` | For testing use: `https://try.access.worldpay.com/`For live use: `https://access.worldpay.com/` | | `checkoutId` | Your unique checkout ID. | | `panId` | The nativeID assigned to your PAN `AccessCheckoutTextInput` component. | | `expiryDateId` | The nativeID assigned to your Expiry date `AccessCheckoutTextInput` component. | | `cvcId` | The nativeID assigned to your CVC `AccessCheckoutTextInput` component. | ### Generate CARD session and CVC session The `useAccessCheckout` hook returns an object made of a `generateSessions` property which is a function. To generate a session, call the `generateSessions` function and pass in argument an array containing the session type(s) that you wish to generate, `CARD` and `CVC` in this instance. Note that session types are imported from our SDK. Here's an example of what you should do when your customer submits their card details. JavaScript import {Button, View} from 'react-native'; import { //... CARD, CVC, } from '@worldpay/access-worldpay-checkout-react-native-sdk'; export default function CardFlow() { function handleOnPress() { const sessionTypes = [CARD, CVC]; generateSessions(sessionTypes) .then((sessions) => { const cardSession = sessions.card; const cvcSession = sessions.cvc; // do something with the card and cvc sessions ... }) .catch((error) => { // do something in case of error }); } return ( ...