layout
to accordion
. You also have the option to specify other properties, such as those shown in the following example:
layout
to tabs
. You also have the option to specify other properties, such as tabs
or collapsed
:
walletReturnUrl
for post-payment redirects and a style
property to customize the wallet’s appearance, offering flexibility for seamless integration:
Variable | Description | Values |
---|---|---|
walletReturnUrl: string | Defines the URL to redirect users to after completing a payment | This will take a URL string as its value |
applePay: showType googlePay: showType payPal: showType klarna: showType | Determines the visibility of Apple Pay, Google Pay, PayPal, and Klarna | showType can take two values:• "auto" : Display when supported• "never" : Always hidden |
style: { theme, type, height, buttonRadius } | Configures the wallet’s appearance with the following options: • theme : Sets the theme• type : Defines the style type (e.g., buy)• height : Specifies the height of the wallet• buttonRadius : Adjusts the button corner radius | • theme : Can take values as dark , light , or outline • type : Specifies the wallet button style with options including checkout , pay , buy , installment , default , book , donate , order , addmoney , topup , rent , subscribe , reload , support , tip , and contribute |
Variable | Description |
---|---|
fontFamily | The font family used throughout Widgets. Widget supports CSS fonts and custom fonts by passing the fonts option; reference to elements consumer |
fontSizeBase | The font size that’s set on the root of the Widget. By default, other font size variables like fontSizeXs or fontSizeSm are scaled from this value using rem units |
spacingUnit | The base spacing unit that all other spacing is derived from. Increase or decrease this value to make your layout more or less spacious |
borderRadius | The border radius used for tabs, inputs, and other components in the Widget |
colorPrimary | A primary color used throughout the Widget. Set this to your primary brand color |
colorBackground | The color used for the background of inputs, tabs, and other components in the Widget |
colorText | The default text color used in the Widget |
colorDanger | A color used to indicate errors or destructive actions in the Widget |
fontVariantLigatures | The font-variant-ligatures setting of text in the Widget |
fontVariationSettings | The font-variation-settings setting of text in the Widget |
fontWeightLight | The font weight used for light text |
fontWeightNormal | The font weight used for normal text |
fontWeightMedium | The font weight used for medium text |
fontWeightBold | The font weight used for bold text |
fontLineHeight | The line-height setting of text in the Widget |
fontSizeXl | The font size of extra-large text in the Widget. By default this is scaled from var(--fontSizeBase) using rem units |
fontSizeLg | The font size of large text in the Widget. By default this is scaled from var(--fontSizeBase) using rem units |
fontSizeSm | The font size of small text in the Widget. By default this is scaled from var(--fontSizeBase) using rem units |
fontSizeXs | The font size of extra-small text in the Widget. By default this is scaled from var(--fontSizeBase) using rem units |
fontSize2Xs | The font size of double-extra small text in the Widget. By default this is scaled from var(--fontSizeBase) using rem units |
fontSize3Xs | The font size of triple-extra small text in the Widget. By default this is scaled from var(--fontSizeBase) using rem units |
colorSuccess | A color used to indicate positive actions or successful results in the Element |
colorWarning | A color used to indicate potentially destructive actions in the Element |
colorPrimaryText | The color of text appearing on top of any var(--colorPrimary) background |
colorBackgroundText | The color of text appearing on top of any var(--colorBackground) background |
colorSuccessText | The color of text appearing on top of any var(--colorSuccess) background |
colorDangerText | The color of text appearing on top of any var(--colorDanger) background |
colorWarningText | The color of text appearing on top of any var(--colorWarning) background |
colorTextSecondary | The color used for text of secondary importance. For example, this color is used for the label of a tab that isn’t currently selected |
colorTextPlaceholder | The color used for input placeholder text in the Widget |
rules
option is a map of CSS-like selectors to CSS properties, allowing granular customization of individual components. After defining your theme and variables, use rules to seamlessly integrate Elements to match the design of your site. The selector for a rule can target any of the public class names in the Element, as well as the supported states, pseudo-classes, and pseudo-elements for each class.
For example, the following are valid selectors:
.Tab
, .Label
, .Input
, .InputLogo
, .SaveWalletDetailsLabel
, .OrPayUsingLabel
, .TermsTextLabel
, .InfoElement
, .OrPayUsingLine
.Tab:focus
.Input--invalid
, .Label--invalid
, .InputLogo--invalid
.Input::placeholder
.billing-section
, .billing-details-text
.Input--empty
, .InputLogo--empty
boxShadow
for the box-shadow
property).
Class Name | States | Pseudo-Classes | Pseudo-Elements |
---|---|---|---|
.Tabs | --selected | :hover , :focus , :active , :disabled | |
.Tab | --selected | :hover , :focus , :active , :disabled |
Class Name | States | Pseudo-Classes | Pseudo-Elements |
---|---|---|---|
.Label | --empty , --invalid | ||
.Input | --empty , --invalid | :hover , :focus , :disabled , :autofill | ::placeholder , ::selection |
.Error |
Class Name | States | Pseudo-Classes | Pseudo-Elements |
---|---|---|---|
.Checkbox | --checked | :hover | |
.CheckboxLabel | --checked | :hover | |
.CheckboxInput | --checked | :hover |
Class Name | States | Pseudo-Classes | Pseudo-Elements |
---|---|---|---|
.InputLogo | --invalid , --empty | :hover |
Class Name | States | Pseudo-Classes | Pseudo-Elements |
---|---|---|---|
.SaveWalletDetailsLabel | :hover | ||
.OrPayUsingLabel | :hover | ||
.OrPayUsingLine | :hover | ||
.TermsTextLabel | :hover | ||
.InfoElement | :hover |
hyper.elements(options)
.
Variable | Description |
---|---|
buttonBackgroundColor | Sets the background color of the payment button |
buttonHeight | Define the height of the payment button |
buttonWidth | Specify the width of the payment button |
buttonBorderRadius | Adjust the border radius of the payment button for rounded corners |
buttonBorderColor | Sets the color of the border surrounding the payment button |
buttonTextColor | Define the color of the text displayed on the payment button |
buttonTextFontSize | Customize the font size of the text on the payment button |
buttonTextFontWeight | Specify the font weight of the text on the payment button |
buttonBorderWidth | Specify the border width of the button |
branding
prop:
customMessageForCardTerms
property:
hideCardNicknameField
property allows you to hide the card nickname field when saving a card:
hideExpiredPaymentMethods
property allows you to control whether expired saved payment methods are hidden or not:
showCardFormByDefault
property determines whether the card form is displayed by default or not:
terms
property allows you to configure the display of terms for various payment methods:
displaySavedPaymentMethods
property determines whether saved payment methods are displayed:
displaySavedPaymentMethodsCheckbox
property determines whether the “Save payment methods” checkbox is displayed:
paymentMethodOrder
property allows you to specify the order in which payment methods are displayed:
business
property allows you to specify a business name to be attached to the terms. By default, the merchant name will be taken as the business name:
readOnly
property puts the SDK into read-only mode, disabling all interactions:
showShortSurchargeMessage
property allows merchants to display a short message when a surcharge is applied, instead of the default message provided by the SDK.
The short message format will be: Fee: