Getting started
React Quick Start
Build your first checkout form with FloPay in a React application.
React Quick Start
This guide walks through a minimal working checkout using @flopay/react.
Prerequisites
- Packages installed (Installation)
- A checkout session ID from the billing API
Recommended: FloPayCheckout
The simplest way to add payments — one component, one prop:
That's the entire integration. FloPayCheckout handles everything:
- Fetches the checkout session from the billing API
- Detects the payment provider and extracts the publishable key
- Initializes the FloPay SDK automatically
- Renders a
SplitCardFormwith card fields + PayPal - Injects customer data (email, userId) from the session
- Runs the full payment flow: tokenize → create intent → confirm → process → 3DS retry
- Calls
onCompletewith thePaymentResult
billingApiUrl defaults to the shared constant. You only need to pass it if your billing API is at a different URL.
Next Steps
- FloPayCheckout API Reference — all props and customization options
- Create sessions server-side
- Theming
Advanced: Manual Provider Setup
For full control over provider initialization, you can set up FloPayProvider manually:
Use this when you need to:
- Control the Stripe publishable key explicitly
- Pass custom element options (clientSecret, amount, currency)
- Use the FloPay SDK outside of React
- Render multiple form components in custom layouts