Featured Mobile Integration
Official Bolt React Native SDK
Bolt payments for React Native apps: card tokenization, 3D Secure, Apple Pay and Google Pay in one SDK.
Secure Card Fields
Card data never touches your app.TypeScript Support
Typed exports for payments, wallets and 3D Secure.Apple Pay & Google Pay
Native wallet buttons for iOS and Android.3D Secure
Built-in 3DS verification and challenge handling.
Package Installation
npm install @boltpay/react-native react-native-webview react-native-get-random-valuesRequirements
React Native 0.73+ and React 18+. On iOS, run cd ios && pod install after installing.
Repo: github.com/BoltApp/bolt-react-native-sdk
iOS SDK
Bolt iOS Checkout SDK
Native Swift APIs for Bolt Checkout, Bolt account login and custom payment flows. Works with UIKit and SwiftUI.
https://github.com/BoltApp/bolt-ios-checkout-sdkSwift PackageAndroid SDK
Bolt Android SDK
Kotlin APIs for Bolt Checkout, Bolt account login (OAuth 2.0) and custom payment flows.
implementation("com.bolt:checkout:0.10.2")GradlePlug into your existing Commerce Stack.
Don't rebuild your backend. If you use a major ecommerce platform, utilize our pre-built, officially maintained plugins for a fast, reliable setup.
Building Headless? Choose your framework.
<!-- Load connect.js before the code that calls Bolt. -->
<!-- Keep async and defer off this tag. -->
<script
id="bolt-connect"
src="https://connect-sandbox.boltapp.com/connect.js"
data-publishable-key="YOUR_SANDBOX_PUBLISHABLE_KEY"
></script>
<button id="bolt-checkout-button" type="button" disabled>
Checkout with Bolt
</button>// /api/checkout/order-token is YOUR backend route. It calls Bolt's
// order-token API (see the Backend tab) and returns { token }.
// The browser success callback is not a trusted payment record:
// confirm the payment on your server before you fulfill the order.
async function initializeBoltButton() {
const checkoutButton = document.querySelector("#bolt-checkout-button");
const BoltCheckout = window.BoltCheckout;
if (!BoltCheckout?.configure) {
throw new Error("Bolt Checkout did not load");
}
checkoutButton.disabled = false;
checkoutButton.addEventListener("click", async () => {
checkoutButton.disabled = true;
try {
const response = await fetch("/api/checkout/order-token", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ cartId: "CURRENT_CART_ID" }),
});
if (!response.ok) {
throw new Error(`Order token request failed: ${response.status}`);
}
const { token } = await response.json();
const configuredCheckout = BoltCheckout.configure(
{ orderToken: token },
{},
{
success: (_transaction, complete) => complete(),
},
);
if (!configuredCheckout?.open) {
throw new Error("Bolt Checkout could not be configured");
}
configuredCheckout.open();
} finally {
checkoutButton.disabled = false;
}
});
}
initializeBoltButton().catch(console.error);# Install the SDK and its peer dependencies
# Repository: https://github.com/BoltApp/bolt-react-native-sdk
npm install @boltpay/react-native react-native-webview react-native-get-random-values
# or
yarn add @boltpay/react-native react-native-webview react-native-get-random-values
# For iOS:
cd ios && pod install
# Requirements: React Native >= 0.73.0, React >= 18.0.0import { Bolt, BoltProvider } from '@boltpay/react-native';
const bolt = new Bolt({
publishableKey: 'YOUR_PUBLISHABLE_KEY',
environment: 'sandbox', // or 'production'
});
function App() {
return (
<BoltProvider client={bolt}>
<CheckoutScreen />
</BoltProvider>
);
}import { CreditCard, useThreeDSecure } from '@boltpay/react-native/payments';
function CheckoutScreen() {
const cc = CreditCard.useController();
const threeDSecure = useThreeDSecure();
// Listen for field events
cc.on('valid', () => setCanSubmit(true));
cc.on('error', (msg) => setFieldError(msg));
const handlePayment = async () => {
// 1. Tokenize — returns TokenResult | Error (never throws)
const result = await cc.tokenize();
if (result instanceof Error) {
console.error(result.message);
return;
}
// result: { token?, last4?, bin?, network?, expiration?, postal_code? }
// 2. Fetch 3DS reference ID — throws ThreeDSError on failure
const referenceID = await threeDSecure.fetchReferenceID({
token: result.token,
bin: result.bin,
last4: result.last4,
});
// 3. Send token to your backend to create the payment
const paymentResponse = await yourApi.createPayment(result);
// 4. Handle 3DS challenge if required — returns ThreeDSResult (never throws)
if (paymentResponse['.tag'] === 'three_ds_required') {
const challengeResult = await threeDSecure.challengeWithConfig(
paymentResponse.id,
{
referenceID,
jwtPayload: paymentResponse.jwt_payload,
stepUpUrl: paymentResponse.step_up_url,
}
);
if (!challengeResult.success) {
console.error(challengeResult.error?.message);
}
}
};
return (
<>
<CreditCard.Component controller={cc} />
<threeDSecure.Component />
<Button onPress={handlePayment} title="Pay" />
</>
);
}// Swift Package Manager
// In Xcode: File > Add Package Dependencies...
// URL: https://github.com/BoltApp/bolt-ios-checkout-sdk (Up to Next Major)
// Or in Package.swift:
dependencies: [
.package(url: "https://github.com/BoltApp/bolt-ios-checkout-sdk", from: "0.8.2")
]// Call initialize() exactly once, before using BoltCheckout.shared.
import BoltCheckoutSDK
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
BoltCheckout.initialize(
publishableKey: "YOUR_PUBLISHABLE_KEY",
merchantDivisionId: "YOUR_MERCHANT_DIVISION_ID",
environment: .production // or .sandbox
)
return true
}
}// Call initialize() exactly once, before using BoltCheckout.shared.
import BoltCheckoutSDK
import SwiftUI
@main
struct MyApp: App {
init() {
BoltCheckout.initialize(
publishableKey: "YOUR_PUBLISHABLE_KEY",
merchantDivisionId: "YOUR_MERCHANT_DIVISION_ID",
environment: .production
)
}
var body: some Scene {
WindowGroup { ContentView() }
}
}// App-level build.gradle.kts (published to Maven Central)
dependencies {
implementation("com.bolt:checkout:0.10.2")
}<application
android:name=".MyApplication"
...>
</application>// Call init() exactly once, typically in Application.onCreate().
import android.app.Application
import com.bolt.checkout.BoltCheckout
import com.bolt.checkout.model.BoltEnvironment
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
BoltCheckout.init(
application = this,
publishableKey = "YOUR_PUBLISHABLE_KEY",
environment = BoltEnvironment.PRODUCTION, // or BoltEnvironment.SANDBOX for testing
)
}
}# Server-side requests authenticate with your API key.
# Never expose the API key in browser or app code.
# Base URLs:
# Sandbox: https://api-sandbox.boltapp.com
# Production: https://api.boltapp.com
# Send these HTTP request headers:
X-API-Key: $BOLT_API_KEY
Content-Type: application/json// Create an order token for Bolt Checkout (server-side only)
const baseUrl = process.env.BOLT_API_BASE_URL ?? "https://api-sandbox.boltapp.com";
const apiKey = process.env.BOLT_API_KEY;
if (!apiKey) throw new Error("Missing BOLT_API_KEY");
const response = await fetch(`${baseUrl}/v1/merchant/orders`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": apiKey,
},
body: JSON.stringify({
cart: {
order_reference: "order_100",
display_id: "displayid_100",
currency: "USD",
total_amount: 41200,
tax_amount: 900,
items: [
{
name: "Bolt Coffee Mug",
reference: "sku-mug-01",
sku: "MUG-01",
unit_price: 20150,
total_amount: 40300,
quantity: 2,
image_url: "https://example.com/img/mug.png",
},
],
},
channel: "browser",
}),
});
if (!response.ok) {
throw new Error(`Order token request failed: ${response.status} ${await response.text()}`);
}
const { token } = await response.json();// Capture an authorized transaction (server-side only).
// Confirm the payment on your server first (webhook or Merchant Callback);
// transaction webhooks carry the transaction reference in data.reference.
const baseUrl = process.env.BOLT_API_BASE_URL ?? "https://api-sandbox.boltapp.com";
const response = await fetch(`${baseUrl}/v1/merchant/transactions/capture`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": process.env.BOLT_API_KEY,
},
body: JSON.stringify({
transaction_reference: "LBLJ-TWW7-R9VC",
amount: 41200, // in cents
currency: "USD",
}),
});
if (!response.ok) {
throw new Error(`Capture failed: ${response.status}`);
}# Recurring billing runs on Bolt Subscriptions, which works with any processor.
# Bolt handles renewals, failed-payment retries and renewal reminders.
# Base URLs:
# Sandbox: https://api-sandbox.boltapp.com
# Production: https://api.boltapp.com
GET /v1/subscriptions
GET /v1/subscriptions/{subscription_id}/orders
POST /v1/subscriptions/{subscription_id}/pause
POST /v1/subscriptions/{subscription_id}/unpause
POST /v1/subscriptions/{subscription_id}/cancel
POST /v1/usage_events
# Setup guide: https://help.boltapp.com/products/bolt-subscriptions/subscriptions-setup/
# Full reference: https://help.boltapp.com/api-bolt/# Subscription webhook events you can listen for:
subscription_created
subscription_renewed
subscription_payment_failed
subscription_paused
subscription_unpaused
subscription_canceled
subscription_ended
# Webhooks guide: https://help.boltapp.com/developers/guides/webhooks/Know the Webhook Payload Before You Build.
Example Webhook Payloads
Pick a transaction event to preview an abridged payload. Bolt signs each webhook with an HMAC in the X-Bolt-Hmac-Sha256 header.
These are example payloads, not a runnable sandbox. No webhook is sent from this page.
Example payload (abridged)POST
{
"type": "payment",
"object": "transaction",
"data": {
"id": "T1c3p4yBuVYJ9",
"date": 1795604687000,
"reference": "LBLJ-TWW7-R9VC"
}
}Reference Resources
Docs, status, and support resources for your integration.