Customize Flow for mobile
Last updated: December 22, 2025
Once you've integrated Flow for mobile, you can customize the colors, fonts, and borders of the various UI elements to match your application design.
To customize the properties:
- Create a
designTokensobject and include the color, font, or border keys you want to customize, along with their values. For example:
1val designTokens = DesignTokens(2colorTokens = ColorTokens(3colorAction = 0XFF00CC2D,4colorBackground = 0xFF17201E,5colorBorder = 0XFF00CC2D,6colorDisabled = 0XFFBBFFB9,7colorPrimary = 0XFFB1B1B1,8colorFormBackground = 0XFF24302D,9colorFormBorder = 0XFFB1B1B1,10colorInverse = 0xFFFFFFFF,11colorOutline = 0XFFB1B1B1,12colorSecondary = 0XFF000000,13colorSuccess = 0XFF00CC2D,14colorError = 0XFFFF0000,15colorScrolledContainer = 0XFFE8E6E616),17borderRadius = BorderRadius(18all = 20,19),20borderFormRadius = BorderRadius(21all = 20,22),23fonts = mapOf(24FontName.Subheading to Font(25fontStyle = FontStyle.Italic,26fontWeight = FontWeight.ExtraBold,27fontFamily = FontFamily.Monospace,28letterSpacing = 2,29lineHeight = 2,30),31FontName.Input to Font(32fontStyle = FontStyle.Italic,33fontWeight = FontWeight.ExtraBold,34fontFamily = FontFamily.Monospace,35letterSpacing = 2,36lineHeight = 2,37),38FontName.Button to Font(39fontStyle = FontStyle.Italic,40fontWeight = FontWeight.ExtraBold,41fontFamily = FontFamily.SansSerif,42letterSpacing = 2,43lineHeight = 2,44),45FontName.Label to Font(46fontStyle = FontStyle.Normal,47fontWeight = FontWeight.Light,48fontFamily = FontFamily.Cursive,49letterSpacing = 2,50lineHeight = 2,51),52),53)
- Pass the
designTokenswhen you create the configuration instance:
1val configuration = CheckoutComponentConfiguration(2context = context,3paymentSession = paymentSession,4publicKey = publicKey,5environment = environment,6appearance = designTokens,7)
You can customize the color of the following UI elements:
To customize an element, provide a color value to any of the following keys:
| Key | Format |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To make Flow for mobile use the same fonts as your web checkout page, use web fonts and set the font family names in the fontFamily key.
Use the following properties to modify the fonts for specific UI elements:
| Property | Type |
|---|---|
|
|
|
|
|
|
|
|
|
|
You can modify the following sub-properties of each font property:
| Property | Type | Example |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Information
To modify the text displayed in the UI, add a custom translation. For example, to change the text displayed within the payment button.
Use the following properties to modify the borders for specific UI elements:
| Property | Type | Default value |
|---|---|---|
|
|
|
|
|
|
You can customize options for the individual Flow components using component-specific configuration.
1/**2* Options for configuring the behavior of a component of a payment method, which overrides the default configuration.3*4* @property showPayButton Indicates whether the pay button should be displayed for this payment method.5* @property callback Callback functions for handling events in the Component.6* @property paymentButtonAction The action to be performed when the pay button is tapped.7* @property googlePayConfiguration Configuration for Wallet payment method.8* @property addressConfiguration Configuration for billing address functionality for card payment.9* @property rememberMeConfiguration Configuration for the Remember Me payment method.10* @property cardConfiguration Configuration for card payment method.11*/12public data class ComponentOption(13val showPayButton: Boolean? = true,14val callback: ComponentCallback? = null,15val paymentButtonAction: PaymentButtonAction = PaymentButtonAction.PAYMENT,16val googlePayConfiguration: GooglePayConfiguration? = null,17val addressConfiguration: AddressConfiguration? = null,18val rememberMeConfiguration: RememberMeConfiguration? = null,19val cardConfiguration: CardConfiguration? = null,20)
| Component key | Description |
|---|---|
| Specifies whether the pay button should be displayed for this payment method. Mainly used for card payments. |
| Callback functions for handling events in the specific component. |
| The list of accepted card schemes for card payments. This can be one of:
|
| The position of the cardholder name input field for card payments. This configuration takes the following values:
|
| The list of accepted card schemes for Google Pay payments, as mapped to the Google Pay API. This can be one of:
|
| The action to perform when the user selects the pay button. Mainly used for card payments.
|
| The list of accepted card schemes for card payments. This can be one of:
|
| Pre-filled data for Remember Me. This configuration supports email address and phone number. |
| Indicates whether to display the pay button for Remember Me. |
| Configuration for managing the address collection and handling during the checkout process. Mainly used for card payments.
|