3D Secure
How FloPay handles 3D Secure authentication for card payments.
3D Secure (3DS)
3D Secure is a security protocol that adds an extra authentication step for card payments. FloPay handles 3DS automatically in both CheckoutForm and SplitCardForm.
Automatic Handling
In self-contained mode (no onTokenizedBody), 3DS is fully automatic:
- After processing a payment, the billing API may return
type: '3ds_required'with athreeDSecureToken - The form calls
confirmCardPaymentwith the token, which triggers the 3DS modal - The user completes authentication in the modal
- The form retries
processPaymentwith the confirmed payment intent - This loop repeats until the payment succeeds or fails
No code is needed on your part -- just provide onComplete and onError:
Delegated Mode (Manual 3DS)
When using onTokenizedBody, you receive the tokenized card data and handle backend submission yourself. You must check for 3DS responses and use the form ref to trigger authentication.
Backend Response Format
Your backend should return one of:
The threeDSecureToken is the Stripe PaymentIntent client secret that requires further action.
Handling 3DS in Delegated Mode
The handleNextAction method calls Stripe's confirmCardPayment under the hood, which displays the 3DS iframe to the user. Make sure the form is still mounted when you call it.
When Does 3DS Trigger?
3DS is triggered by the card issuer, not by FloPay. Common triggers include:
- Cards enrolled in 3DS programs (most European cards under SCA/PSD2)
- High-value transactions
- Transactions flagged as potentially fraudulent by the issuer
- First-time use of a card on a new merchant