This page provides the complete reference for all delegate interfaces, result types, and data models in the Bolt Android SDK (com.bolt:checkout). The SDK is available on Maven Central.
BoltCheckoutDelegate
Implement this delegate when using getBoltCheckoutActivityResultLauncher().
Terminal Callbacks (Required)
| Callback | Parameters | Description |
|---|
onCheckoutSuccess(result) | result: BoltCheckoutResult | Called when the user completes checkout and payment is authorized. Use result.cart?.orderReference, result.reference, and result.merchantOrderNumber to reconcile with your backend. |
onCheckoutError(errorReason) | errorReason: String | Called when checkout fails due to a network error, payment decline, validation failure, or other unexpected issue. |
onCheckoutCancel() | (none) | Called when the user intentionally dismisses the checkout UI. The order token remains valid for a subsequent attempt. |
Lifecycle Callbacks (Optional)
These default to no-op and are useful for analytics:
| Callback | Parameters | Description |
|---|
onCheckoutStart() | (none) | Checkout flow started and the UI is presented. |
onEmailEnter(email) | email: String | User entered and validated their email address. |
onShippingDetailsComplete(address) | address: BoltShippingAddress | Shipping address validated. |
onShippingOptionsComplete() | (none) | User selected a delivery option and proceeded to payment. |
onPaymentSubmit() | (none) | User tapped the pay button. |
onCartLoaded() | (none) | Cart loaded and checkout page is ready. WebView mode only. |
onNotify(eventName, eventSeverity) | eventName: String, eventSeverity: String | Checkout page emitted a notification event. WebView mode only. |
Bidirectional Callbacks (Optional, Suspend: WebView Mode Only)
These are request/response callbacks: the checkout WebView sends a request and waits for your app to respond. Both are suspend functions, so you can perform async work before returning.
| Callback | Return Type | Description |
|---|
check() | Boolean | Called before checkout opens. Return true to proceed, false to cancel (e.g. cart validation failed). Defaults to true. |
fetchShippingOptions(address) | BoltFrontendShippingAndTaxResult? | Called when the user enters a shipping address. Return shipping options and tax, or null to fall back to backend-managed shipping. Defaults to null. |
BoltCheckoutResult
onCheckoutSuccess receives a BoltCheckoutResult that mirrors Bolt’s ClientTransactionView. All fields are optional where the type allows null.
Reconciliation Fields
| Field | Role |
|---|
cart?.orderReference | Bolt order reference string. |
reference | Transaction reference from the payment processor. |
merchantOrderNumber | Your merchant-facing order number when Bolt provides it. |
amount | Charged totals: see BoltAmountView below. |
Transaction Core
| Field | Type | Description |
|---|
id | String | Transaction ID. |
type | String | Transaction type. |
processor | String | Payment processor identifier. |
date | Long | Transaction timestamp (Unix epoch milliseconds). |
reference | String | Transaction reference. |
status | String | Overall transaction status. |
amount | BoltAmountView | Primary amount: use for display and reconciliation. |
BoltAmountView
| Field | Type | Description |
|---|
amount | Long | Amount in minor currency units (e.g. cents). |
currency | String | ISO 4217 code (e.g. "USD"). |
currencySymbol | String | Display symbol (e.g. "$"). |
Parties and Payment Instruments
| Field | Type | Description |
|---|
fromConsumer | BoltConsumerView? | Payer (id, email, firstName, lastName, phone). |
toConsumer | BoltConsumerView? | Payee when applicable. |
fromCreditCard | BoltCreditCardView? | Card used (id, last4, bin, expiration, network, billing address). |
toCreditCard | BoltCreditCardView? | Destination card when applicable. |
last4 | String? | Last four digits of the card at the transaction level. |
Authorization, Capture, and Risk
| Field | Type | Description |
|---|
authorization | BoltAuthorizationView? | status and reason for the auth decision. |
captures | List<BoltCaptureView>? | Capture records (status, amount as BoltAmountView). |
credit | BoltCreditView? | Credit leg status when present. |
transactionProperties | BoltTransactionProperties? | avsResult, cvvResult from the processor. |
orderDecision | BoltOrderDecisionView? | Fraud/order decision (score, decisionFactors). |
riskScore | Double? | Risk score when provided. |
customerListStatus | BoltCustomerListStatus? | autoApproved, blockListed. |
indemnificationDecision | String? | Indemnification decision when applicable. |
indemnificationReason | String? | Indemnification reason when applicable. |
splits | List<BoltTransactionSplitView>? | Split payouts (amount, type). |
lastViewedUtc | Long? | Last viewed time (epoch ms). |
viewStatus | String? | View/status string. |
hasRefunds | Boolean? | Whether refunds exist on the transaction. |
Addresses and Shipping
| Field | Type | Description |
|---|
shippingAddress | BoltAddressInput? | Shipping address (names, street, locality, region, postal code, country, phone, email). |
billingAddress | BoltAddressInput? | Billing address when distinct from shipping. |
shippingOption | BoltShippingOption? | Selected shipping option. When valid, value includes service, cost, reference, carrier, ETA, tax, and signature details. |
BoltShippingOption is the checkout success parcelable (selected shipment on the transaction). It is not the same type as BoltFrontendShippingOption, which is only used in fetchShippingOptions.
Cart, Integrations, and Notes
| Field | Type | Description |
|---|
cart | BoltTransactionCart? | orderReference, discounts (BoltCartDiscountView), items (BoltCartItemView). |
shopify | BoltShopifyResponse? | Shopify-hosted payment fields when applicable. |
sfcc | BoltSfccOrderResponse? | SFCC integration: sfccOrderToken when present. |
customFieldResponses | List<BoltCustomFieldResponse>? | Custom fields: publicId, response. |
userNote | String? | User-supplied order note when captured. |
BoltLoginDelegate
Implement this delegate when using getLoginActivityResultLauncher().
| Callback | Parameters | Description |
|---|
onLoginSuccess(authCode, codeVerifier, state) | authCode: String, codeVerifier: String, state: String | User authenticated successfully. Send authCode and state to your backend for token exchange. |
onLoginError(errorReason) | errorReason: String | Login failed (network error, invalid session, or user denied permissions). |
onLoginCancel() | (none) | User dismissed the login screen. No partial session is created. |
BoltPaymentFlowDelegate
Implement this delegate when using getPaymentFlowActivityResultLauncher(). The payment flow is a standalone UI for collecting and tokenizing a payment method without running the full checkout.
| Callback | Parameters | Description |
|---|
onPaymentFlowSuccess(paymentFlowMethod, creditCard) | paymentFlowMethod: BoltPaymentMethod, creditCard: BoltCreditCard? | Card successfully tokenized. creditCard contains token, last4, network, expiration, and postal code. |
onPaymentFlowError(errorReason) | errorReason: String | Tokenization or network failure. |
onPaymentFlowCancel() | (none) | User dismissed the payment collection screen. |
BoltPaymentAuthorizationDelegate
Implement this delegate when calling authorizePayment(). Used in custom checkout flows where you collected a card via the payment flow.
| Callback | Parameters | Description |
|---|
onPaymentAuthorizationSuccess(orderReference) | orderReference: String | Payment authorized. Use the reference to confirm the order with your backend. |
onPaymentAuthorizationFail(status, reason) | status: String, reason: String | Authorization declined by the processor (e.g. insufficient funds, suspected fraud). |
onPaymentAuthorizationError(errorReason) | errorReason: String | Request failed before reaching the processor (e.g. network timeout, missing tokenized card). |
Shipping Types
BoltFrontendShippingOption
Each entry in BoltFrontendShippingAndTaxResult.shippingOptions:
| Field | Type | Description |
|---|
service | String | Human-readable shipping method name (e.g. "Standard Shipping"). |
cost | Long | Shipping cost in minor currency units (cents). |
currency | String | ISO 4217 currency code. Defaults to "USD". |
reference | String | Opaque identifier for this option, passed back to the backend. May be empty. |
carrier | String | Carrier name (e.g. "FedEx"). May be empty. |
estimatedDeliveryDate | String | Estimated delivery date string (e.g. "2026-04-14"). May be empty. |
taxAmount | Long | Per-option shipping tax in cents. Defaults to 0. |
BoltFrontendShippingAndTaxResult
Return type for fetchShippingOptions:
| Field | Type | Description |
|---|
shippingOptions | List<BoltFrontendShippingOption> | Available shipping options to display in checkout. |
taxAmount | Long | Cart-level tax amount in cents (product tax, not shipping tax). Defaults to 0. |
taxCurrency | String | ISO 4217 currency code for taxAmount. Defaults to "USD". |