WebElementGroup Options

Parameters

ParameterRequired/OptionalTypeDescription
optionsoptionalobjectInitialization Options

options

ParameterRequired/OptionalTypeDescription
moderequiredstringOptions are "payment" or "setup".
currencyrequiredstringThe three-letter ISO currency code in lowercase. E.g. "usd".
amountconditionally required - required when mode is "payment"decimalThis amount is shown in Apple Pay and Google Pay Payment Sheets when enabling digital wallets.
setupFutureUsageoptionalstringOptions are "on_session" or"off_session". Indicates that the payment details will be saved for later use.

"on_session": The saved payment details will be used when the customer is present on the checkout page.

"off_session": The saved payment details will be used when the customer may or may not be present on the checkout page.
paymentMethodTypesoptionalarrayPayment methods to be shown.

Options for the array are: "card" and "us_bank_account". If not provided or empty, it defaults to ["card","us_bank_account"].
fontsoptionalobjectFonts to be shown.
appearanceoptionalobjectObject to specify colors, fonts, borders, padding, and more.

fonts.cssFontSource

ParameterRequired/OptionalTypeDescription
srcrequiredstringA relative or absolute URL pointing to a CSS file with @font-face definitions.
familyrequiredstringThe name of the font.

fonts.customFontSource

ParameterRequired/OptionalTypeDescription
srcrequiredstringA valid src value pointing to your font file. This could be a link to a file with a .wof, .otf, or .svg suffix.
familyrequiredstringThe name of the font.
displayoptionalstringA valid font-display value.
styleoptionalstringOne of normal, italic, oblique. Defaults to normal.
unicodeRangeoptionalstringA valid unicode-range value.
weightoptionalstringA valid font-weight.

appearance

ParameterRequired/OptionalTypeDescription
labelsoptionalstringLabels can be set to either "above" or "floating":

"above": Displays labels above the form fields.
"floating": Displays labels within the form fields, floating above the input when it is focused or filled.
variablesoptionalobjectVariables to customize the appearance of the components.

appearance.variables

Commonly used variables
VariableDescription
gtrColorPrimaryThis variable sets the primary border color for UI elements when focused, as well as the color of scrollbars.

e.g., Input focus, select focus, and select dropdown scrollbar color.

Variables that use this as their default value:
gtrNavColorBorderActive
gtrNavBorderRightActive
gtrNavBorderLeftActive
gtrNavBorderTopActive
gtrNavBorderBottomActive
gtrNavBorderBottomActive
gtrColorBackgroundThis variable sets the background color for input and select elements.

Variables that use this as their default value:
gtrNavColorBackgroundActive
gtrNavColorBackground
gtrColorTextThis variable sets the color for text fields in input and select elements, as well as the chevron icon color in select boxes. It also defines the color for the terms area and text inside Google and Apple buttons.

By default, it also controls the color of icons.

Variables that use this as their default value:
gtrIconChevronDownColor
gtrIconChevronDownHoverColor
gtrColorDangerThis variable sets the color for validation error messages in forms. It also changes the color of the inner input card icons when there is an error in the field.
gtrColorTextPlaceholderThis variable sets the placeholder colors for all elements in the payment SDK. It also applies the same color to placeholder icons.
gtrContainerBackgroundColorThis variable sets the background color of the iframe container.
gtrBorderRightThis variable sets the right border for form elements, excluding navigation and accordion elements. It also defines the right border of the accordion's outer border.
gtrBorderLeftThis variable sets the left border for form elements, excluding navigation and accordion elements. It also defines the left border of the accordion’s outer border.
gtrBorderTopThis variable sets the top border for all form elements, except for navigation (nav) and accordion components. For the accordion, it specifically defines the outer top border.
gtrBorderBottomThis variable sets the bottom border for all form elements, except for navigation (nav) and accordion components. For the accordion, it specifically defines the outer bottom border.
gtrBorderTopLeftRadiusThis variable sets the top-left border radius for form elements like input and select.
gtrBorderTopRightRadiusThis variable sets the top-right border radius for form elements like input and select.
gtrBorderBottomRightRadiusThis variable sets the bottom-right border radius for form elements like input and select.
gtrBorderBottomLeftRadiusThis variable sets the bottom-left border radius for form elements like input and select.
gtrNavBorderTopLeftRadiusThis variable defines the top-left border radius for the navbar and accordion components.
gtrNavBorderTopRightRadiusThis variable defines the top-right border radius for the navbar and accordion components.
gtrNavBorderBottomRightRadiusThis variable defines the bottom-right border radius for the navbar and accordion components.
gtrNavBorderBottomLeftRadiusThis variable defines the bottom-left border radius for the navbar and accordion components.
gtrNavLinkBorderTopThis variable sets the top border for navbar links, using gtrBorderWidth and gtrBorderColor as default settings to define the gtrNavLinkBorderTop.
gtrNavLinkBorderRightThis variable sets the right border for navbar links, using gtrBorderWidth and gtrBorderColor as default settings to define the gtrNavLinkBorderRight.
gtrNavLinkBorderBottomThis variable sets the bottom border for navbar links, using gtrBorderWidth and gtrBorderColor as default settings to define the gtrNavLinkBorderBottom.
gtrNavLinkBorderLeftThis variable sets the left border for navbar links, using gtrBorderWidth and gtrBorderColor as default settings to define the gtrNavLinkBorderLeft.
gtrNavColorBorderActiveThis variable is used in the navbar to set the border color for the active state. By default, it uses the value from the gtrColorPrimary variable.