Examples
Split Card Fields with PayPal
Use individual card number, expiry, and CVC fields alongside an automatic PayPal button.
The SplitCardForm renders separate card number, expiry, and CVC inputs along with a full name field. When showPayPal is enabled (the default), a PayPal button appears above the card fields. PayPal is handled automatically via Stripe's ExpressCheckoutElement.
The SplitCardForm renders this layout:
- PayPal button (via Stripe ExpressCheckoutElement, using its own Elements instance)
- "Or pay with card" divider
- Card Number field
- Card Expiry + CVC fields (side by side)
- Full Name input
- Submit button
Set showPayPal={false} to hide the PayPal button and show only card fields. The totalAmount and currency props are used to configure the PayPal Elements instance.