Components
Last updated: October 6, 2025
The Checkout React Native Components library provides a set of components for integrating Flow for mobile into your React Native application.
The CheckoutProvider component wraps your payment screen and provides configuration context to all child components.
1import { CheckoutProvider, CheckoutConfiguration } from '@checkout.com/checkout-react-native-components';23const config: CheckoutConfiguration = {4publicKey: 'pk_test_your_key',5environment: 'sandbox',6locale: 'en-GB',7merchantIdentifier: 'merchant.com.your-app.name', // Required for Apple Pay8};910<CheckoutProvider11config={config}12paymentSession={paymentSession}13onSuccess={(paymentMethod, paymentID) => {14console.log('Payment successful:', { paymentMethod, paymentID });15}}16onError={(error) => {17console.error('Payment error:', error);18}}19>20{/* Your components */}21</CheckoutProvider>
| Property | Type | Description |
|---|---|---|
required |
| Configuration object. |
required |
| Payment session from your server. |
|
| Component ready callback. |
|
| Form validation callback. |
|
| Payment submission callback. |
|
| Tokenization callback. |
|
| Payment success callback. |
|
| Error handling callback. |
The Flow component provides a complete payment experience with multiple payment methods.
1import { Flow, FlowRef } from '@checkout.com/checkout-react-native-components';23const PaymentScreen = () => {4const flowRef = useRef<FlowRef>(null);56const handleSubmit = () => {7flowRef.current?.submit();8};910return (11<CheckoutProvider config={config} paymentSession={paymentSession}>12<Flow13ref={flowRef}14config={{ showPayButton: false }}15style={{ marginVertical: 20 }}16/>17<Button title="Pay" onPress={handleSubmit} />18</CheckoutProvider>19);20};
| Property | Type | Description |
|---|---|---|
|
| Flow specific configuration. |
|
| React Native styling. |
|
| Imperative API reference. |
| Property | Type | Default | Description |
|---|---|---|---|
|
|
| Show/hide the built-in pay button |
|
|
| Action when pay button is pressed |
The Card component provides a secure card input form.
1import { Card, CardRef } from '@checkout.com/checkout-react-native-components';23const CardPaymentScreen = () => {4const cardRef = useRef<CardRef>(null);5const handleSubmit = () => {6cardRef.current?.submit();7};89return (10<CheckoutProvider config={config} paymentSession={paymentSession}>11<Card12ref={cardRef}13config={{ showPayButton: false }}14/>15<Button title="Pay" onPress={handleSubmit} />16</CheckoutProvider>17);18};
| Property | Type | Description |
|---|---|---|
|
| Card-specific configuration |
|
| React Native styling |
|
| Imperative API reference |
The ApplePay component provides native Apple Pay integration (iOS only).
1import { ApplePay } from '@checkout.com/checkout-react-native-components';23const PaymentScreen = () => {4return (5<CheckoutProvider6config={{7...config,8merchantIdentifier: 'merchant.com.your-app.name' // Required!9}}10paymentSession={paymentSession}11>12<ApplePay style={{ height: 60, marginVertical: 10 }} />13</CheckoutProvider>14);15};
| Property | Type | Description |
|---|---|---|
|
| React Native styling |
Information
Apple Pay requires a valid merchantIdentifier in your CheckoutConfiguration and is only available on iOS devices.
The GooglePay component provides native Google Pay integration (Android only).
1import { GooglePay } from '@checkout.com/checkout-react-native-components';23const PaymentScreen = () => {4return (5<CheckoutProvider config={config} paymentSession={paymentSession}>6<GooglePay />7</CheckoutProvider>8);9};
| Property | Type | Description |
|---|---|---|
|
| Google Pay configuration (reserved for future use) |
|
| React Native styling |
Information
Google Pay is only available on Android devices.
Both Flow and Card components support imperative APIs for programmatic control:
1import { CheckoutProvider, Card, Flow, FlowRef, CardRef } from '@checkout.com/checkout-react-native-components';23const PaymentScreen = () => {4const flowRef = useRef<FlowRef>(null);5const cardRef = useRef<CardRef>(null);67const processPayment = async () => {8flowRef.current?.submit();9};1011const tokenizeCard = async () => {12cardRef.current?.tokenize();13};1415return (16<CheckoutProvider config={config} paymentSession={paymentSession}>17<Flow ref={flowRef} config={{ showPayButton: false }} />18<Card ref={cardRef} config={{ showPayButton: false }} />1920<Button title="Pay" onPress={processPayment} />21<Button title="Tokenize" onPress={tokenizeCard} />22</CheckoutProvider>23);24};
1interface FlowRef {2submit(): void;3tokenize(): void;4}
1interface CardRef {2submit(): void;3tokenize(): void;4}