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 from connect.bolt.com. Card details never touch your app, keeping your integration PCI compliant.

Basic Flow

Step-by-Step Breakdown

  1. Create a controller: CreditCard.useController() returns a controller for the secure card input fields.
  2. Listen for events: Use cc.on() to react to valid, error, blur, and focus events on the card fields.
  3. Tokenize: Call cc.tokenize() to securely tokenize the card. This returns a TokenResult or an Error (it never throws).
  4. Fetch 3DS reference: Pass the token result to threeDSecure.fetchReferenceID() to get a reference ID for 3D Secure verification.
  5. Create payment: Send the token to your backend to initiate the payment via the Bolt API.
  6. Handle 3DS challenge: If the payment response indicates three_ds_required, call threeDSecure.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 a creditCardID, you can perform 3D Secure verification without re-tokenizing:

3D Secure Methods

3D Secure Error Codes