Credit Card Payment
This guide covers credit card tokenization and 3D Secure for Bolt Embeddable Checkout. For the full backend API, see the Embeddable Checkout API Reference. The Bolt React Native SDK tokenizes card data securely in a WebView loaded fromconnect.bolt.com. Card details never touch your app, keeping your integration PCI compliant.
Basic Flow
Step-by-Step Breakdown
- Create a controller:
CreditCard.useController()returns a controller for the secure card input fields. - Listen for events: Use
cc.on()to react tovalid,error,blur, andfocusevents on the card fields. - Tokenize: Call
cc.tokenize()to securely tokenize the card. This returns aTokenResultor anError(it never throws). - Fetch 3DS reference: Pass the token result to
threeDSecure.fetchReferenceID()to get a reference ID for 3D Secure verification. - Create payment: Send the token to your backend to initiate the payment via the Bolt API.
- Handle 3DS challenge: If the payment response indicates
three_ds_required, callthreeDSecure.challengeWithConfig()to present the challenge UI.
Credit Card Controller Methods
3D Secure with a Stored Card
If you’ve already added a card via Bolt’s Add Card API and have acreditCardID, you can perform 3D Secure verification without re-tokenizing: