Overview

The Bolt iOS SDK provides a managed checkout flow that handles the entire payment experience: shipping, payment entry, and order completion. To launch checkout, your backend generates an order token and your app passes it to the SDK. The SDK offers three levels of integration, from simplest to most explicit:

Generating an Order Token (Backend)

Before launching the checkout UI, your backend server must create an order token by calling the Bolt Merchant Orders API. This token represents the cart and is required by the SDK to start checkout.
The API key used to authenticate this request is a secret. This call must be made from your server: never from the mobile app.

Request

Request Body

All amounts are in cents (e.g. 1783 = $17.83).

Response

Your backend returns this token to your mobile app, which then passes it to the SDK.

End-to-End Flow

  1. User taps “Checkout”: app sends cart details to your backend.
  2. Your backend calls POST /v1/merchant/orders with the cart and your API key.
  3. Bolt returns the order token; your backend forwards it to the app.
  4. App passes the token to the SDK.
  5. SDK presents the checkout experience.
  6. App receives the result (success, cancelled, or failed).

Option A: Completion Handler (Simplest)

The SDK automatically finds the topmost view controller and presents the checkout. No UIViewController reference needed: works from anywhere, including SwiftUI.

Option B: Delegate Pattern

Implement BoltSimpleCheckoutDelegate for callback-based results. This approach mirrors the Android SDK’s delegate pattern.

Option C: Present a View Controller Directly

For explicit control over presentation, use BoltCheckoutViewController:
The view controller manages its own navigation and dismisses itself when checkout completes, cancels, or fails: your delegate receives the result.

Pre-Filling Customer Data

Use Bolt.Hints to pre-fill customer details and reduce friction during checkout:

UI Modes

Currently, the SDK supports WebView mode only. The checkout experience is rendered via a Bolt-hosted WebView. Native checkout mode is planned for a future release.