Skip to main content
The objects your app builds and hands to the SDK: the per-transaction configuration, the payment method the shopper picked, and the data you collected yourself when you skip the SDK’s forms.
TransactionConfig is the configuration object passed to the Transaction constructor. It defines the session, locale, controllers, and behavior flags for a single transaction.
On web, TransactionConfig is a plain object passed directly to sdkPayments.transaction(config).

Fields

On Web there is no controller field: wire events (onStatus, showLoading, createPayment) directly as fields on the config. See controller. Without onStatus the SDK logs a console warning and never delivers the result. createPayment must be a function when present. The constructor throws otherwise.Payment-only fields on Web. An enrollment config does not take them, and neither does it take createPayment, showPayButton or autoContinuePayment.
You must pass either checkoutSession or customerSession, but not both. See Validation.

checkoutSession

Session ID for a payment flow. Pass the value returned by your backend after calling POST /v1/checkout/sessions.Mutually exclusive with customerSession.See Sessions for more.

customerSession

Session ID for an enrollment flow. Pass the value returned by your backend after calling POST /v1/customers/sessions.Mutually exclusive with checkoutSession.See Sessions for more.

countryCode

ISO country code for the payment (for example, US, CO).On iOS and Android the SDK does not validate the value. On Web a payment start() that mounts a form or runs headless checks the value against the SDK’s country list. A value outside that list makes start() reject with countryCode=<value> is not valid. An enrollment start() checks only that the value is a non-empty string. See Country coverage for the list of supported countries.

language

ISO-639 language code. Falls back to the device or browser language if omitted.See Supported languages.

controller (iOS, Android)

Object that implements the TransactionController interface. Used to receive transaction events (onStatus, showLoading, createPayment).On iOS and Android, controller is required: onStatus is the only mechanism for receiving the transaction outcome, so a config without a controller would deliver every result nowhere. On iOS the SDK holds the reference weakly, so keep the instance alive for the duration of the transaction.On Web, controllers are wired directly as fields on the config (onStatus, showLoading, createPayment). On iOS and Android, you pass a single controller object through the controller field.See Controllers.

showStatusScreen

Flag that controls whether the SDK presents its built-in result screen after the transaction finishes.
  • false (default on iOS and Android). The SDK does not show a result screen. You receive the final status through onStatus and render your own UI.
  • true (default on Web). The SDK presents its result screen. On iOS the screen is not shown for USER_CANCEL.
onStatus is always invoked, regardless of this flag.

autoContinuePayment

Controls whether the SDK automatically continues the payment flow after creating it. When true (default), the SDK handles 3DS and status polling internally. Set to false if you want to control the post-creation flow manually.On Web the flag applies only when you pass createPayment. Without a handler the SDK creates and continues the payment itself. PayPal ignores false and always continues, because its popup completes inside the SDK’s continue step.On iOS the flag applies whether or not you override createPayment. With false and the default handler, the SDK creates the payment, closes its own views and stops.With false, the SDK stops once the payment is created: it does not poll status, does not run 3DS, and onStatus is not invoked for the transaction.

saveCardEnabled (iOS)

Flag that controls whether the card form offers the save-card checkbox on payments. Defaults to false.
  • false (default). The card form has no save-card checkbox.
  • true. The card form shows the checkbox, unchecked. If the user ticks it, the card is stored on a successful payment.
Payment flows only. The enrollment initializer does not take it.On Web the flag lives inside the card object. See card.

elementSelector (Web only)

CSS selector, or the HTMLElement itself, for the node the SDK renders a form into. Required when start({ paymentMethod }) mounts a payment form. Without it start() rejects with elementSelector=undefined is not valid. Optional for the enrollment form, which otherwise renders into a container the SDK appends to <body>. Headless flows and secure fields ignore it. Wallet and list views take their own elementSelector on .mount().

showPayButton (Web only)

Whether the form the SDK mounts shows the SDK’s own Pay button. Set it to false to use your own button: mount the form with transaction.start({ paymentMethod }) and call transaction.submit() when the user confirms.Payment flows only. Enrollment forms always show the SDK button.

onChange (Web only)

Callback the SDK calls with { form: { isValid } } each time the validity of the mounted form changes. isValid is true when every required field, secure fields included, is valid.

card (Web only)

Options for the card form: styles, type, saveCardEnabled, vaultOnSuccess, texts, documentEnable, isCreditCardProcessingOnly and fonts, plus the callbacks onChange, onGetInstallments and onInstallmentSelected. See Styling and onInstallmentSelected.

texts (Web only)

Button label overrides: customerForm.submitButton and paymentOtp.sendOtpButton.

externalButtons (Web only)

Button options per wallet (googlePay, applePay, samsungPay, paypal, paypalBraintree, revolutPay) and the onShippingAddressChanged callback. Each wallet view’s .mount() accepts the same button options.

appearance (iOS, Android)

Visual customization object for the SDK’s built-in views: font family and colors. Not available on Web.See Styling for the full set of options.

viewController (iOS only)

Optional reference to the UIViewController that the SDK should use to present its UI.Optional when your app is fully built with SwiftUI. Required if you want the SDK to present from a specific UIKit view controller.When you pass nil, the SDK presents from the root view controller of the key window. If there is no window yet, for example when start runs before the scene is active, the transaction ends with INTERNAL_ERROR, message.code NO_PRESENTATION_ANCHOR and message.context Transaction.start. Pass viewController, or start after the window exists.This field exists only on iOS.

Validation

The config rejects both checkoutSession and customerSession being set, or neither. How each platform enforces it differs:On Web, the constructor also throws if countryCode is missing or if createPayment is set to anything other than a function. If onStatus is missing the constructor does not throw. It logs a console warning and the transaction result is never delivered.Beyond those checks, the SDK does not validate the values of countryCode, language, or other fields. Invalid values may surface later as backend errors or unexpected behavior. On Web, start() checks countryCode and elementSelector later. See countryCode and elementSelector.