This function is used to initialize Chargebee with your site, domain name and publishable key(opens new window). The 'chargebee instance' object returned as result of initialization can be used to create the components.
var cbInstance = Chargebee.init({site:"site-name",// your test sitedomain:"https://mybilling.acme.com"// this is an optional parameter.publishableKey:"test__"})
The most dominant color in the component. This color is applied to primary buttons and other interactive elements.
Allowed Values:
indigo (default)
gray
gold
bronze
brown
yellow
amber
orange
tomato
red
ruby
crimson
pink
plum
purple
violet
iris
blue
cyan
teal
jade
green
grass
lime
mint
sky
grayColor
String
The grayscale color used in the component, such as for shadows, out-of-focus elements, disabled elements, and placeholder text. The value auto automatically selects a gray shade that complements the accentColor.
Allowed Values:
auto (default)
gray
mauve
slate
sage
olive
sand
scaling
String
The linear scaling applied to the component. Use this setting to adjust the UI density uniformly across the component.
Allowed Values:
90%
95%
100% (default)
105%
110%
radius
String
Specifies the border-radius factor applied to the component. The resulting border-radius is contextual and varies based on the type of UI element.
Allowed Values:
none
small
medium (default)
large
full
variables
String
accent1
String
Background color 1
accent2
String
Background color 2
accent3
String
Interactive components color 1
accent4
String
Interactive components color 2
accent5
String
Interactive components color 3
accent6
String
Borders and separators color 1
accent7
String
Borders and separators color 2
accent8
String
Borders and separators color 3
accent9
String
Solid color 1
accent10
String
Solid color 2
accent11
String
Accessible text color 1
accent12
String
Accessible text color 2
accentSurface
String
Functional color for surface
accentIndicator
String
Functional color for accent indicator
accentTrack
String
Functional color for accent track
accentContrast
String
Functional color for accent contrast
gray1
String
Gray background 1
gray2
String
Gray background 2
gray3
String
Gray for interactive components 1
gray4
String
Gray for interactive components 2
gray5
String
Gray for interactive components 3
gray6
String
Gray for borders and separators 1
gray7
String
Gray for borders and separators 2
gray8
String
Gray for borders and separators 3
gray9
String
Gray for solid color 1
gray10
String
Gray for solid color 2
gray11
String
Gray for accessible text 1
gray12
String
Gray for accessible text 2
graySurface
String
Gray color for surface
grayIndicator
String
Gray color for accent indicator
grayTrack
String
Gray color for accent track
grayContrast
String
Gray color for accent contrast
colorBackground
String
Page background
colorPanelSolid
String
Solid panel backgrounds, such as cards, tables, popovers, dropdown menus, etc.
colorPanelTranslucent
String
Translucent panel backgrounds, such as cards, tables, popovers, dropdown menus, etc.
colorSurface
String
Form component backgrounds, such as text fields, checkboxes, select, etc.
colorOverlay
String
Dialog overlays
defaultFontFamily
String
Your custom default font
headingFontFamily
String
Your custom font for <Heading> components
codeFontFamily
String
Your custom font for <Code> components
strongFontFamily
String
Your custom font for <Strong> components
emFontFamily
String
Your custom font for <Em> components
quoteFontFamily
String
Your custom font for <Quote> components
fontWeightLight
String
Font weight for light text
fontWeightRegular
String
Font weight for regular text
fontWeightMedium
String
Font weight for medium text
fontWeightBold
String
Font weight for bold text
space1
String
Spacing for 1 unit
space2
String
Spacing for 2 units
space3
String
Spacing for 3 units
space4
String
Spacing for 4 units
space5
String
Spacing for 5 units
space6
String
Spacing for 6 units
space7
String
Spacing for 7 units
space8
String
Spacing for 8 units
space9
String
Spacing for 9 units
radiusFactor
String
Radius base variable, used for multiplying.
radiusFull
String
A variable used to calculate a fully rounded radius.
radiusThumb
String
A variable used to calculate radius of a thumb element.
rules
Object
The rules option is a map of CSS-like selectors to CSS properties, allowing granular customization of individual components.
locale
String
Locale code in ISO 639-1 format (en, fr). By default, `en` will be used
The most dominant color in the component. This color is applied to primary buttons and other interactive elements.
Allowed Values:
indigo (default)
gray
gold
bronze
brown
yellow
amber
orange
tomato
red
ruby
crimson
pink
plum
purple
violet
iris
blue
cyan
teal
jade
green
grass
lime
mint
sky
grayColor
String
The grayscale color used in the component, such as for shadows, out-of-focus elements, disabled elements, and placeholder text. The value auto automatically selects a gray shade that complements the accentColor.
Allowed Values:
auto (default)
gray
mauve
slate
sage
olive
sand
scaling
String
The linear scaling applied to the component. Use this setting to adjust the UI density uniformly across the component.
Allowed Values:
90%
95%
100% (default)
105%
110%
radius
String
Specifies the border-radius factor applied to the component. The resulting border-radius is contextual and varies based on the type of UI element.
Allowed Values:
none
small
medium (default)
large
full
variables
String
accent1
String
Background color 1
accent2
String
Background color 2
accent3
String
Interactive components color 1
accent4
String
Interactive components color 2
accent5
String
Interactive components color 3
accent6
String
Borders and separators color 1
accent7
String
Borders and separators color 2
accent8
String
Borders and separators color 3
accent9
String
Solid color 1
accent10
String
Solid color 2
accent11
String
Accessible text color 1
accent12
String
Accessible text color 2
accentSurface
String
Functional color for surface
accentIndicator
String
Functional color for accent indicator
accentTrack
String
Functional color for accent track
accentContrast
String
Functional color for accent contrast
gray1
String
Gray background 1
gray2
String
Gray background 2
gray3
String
Gray for interactive components 1
gray4
String
Gray for interactive components 2
gray5
String
Gray for interactive components 3
gray6
String
Gray for borders and separators 1
gray7
String
Gray for borders and separators 2
gray8
String
Gray for borders and separators 3
gray9
String
Gray for solid color 1
gray10
String
Gray for solid color 2
gray11
String
Gray for accessible text 1
gray12
String
Gray for accessible text 2
graySurface
String
Gray color for surface
grayIndicator
String
Gray color for accent indicator
grayTrack
String
Gray color for accent track
grayContrast
String
Gray color for accent contrast
colorBackground
String
Page background
colorPanelSolid
String
Solid panel backgrounds, such as cards, tables, popovers, dropdown menus, etc.
colorPanelTranslucent
String
Translucent panel backgrounds, such as cards, tables, popovers, dropdown menus, etc.
colorSurface
String
Form component backgrounds, such as text fields, checkboxes, select, etc.
colorOverlay
String
Dialog overlays
defaultFontFamily
String
Your custom default font
headingFontFamily
String
Your custom font for <Heading> components
codeFontFamily
String
Your custom font for <Code> components
strongFontFamily
String
Your custom font for <Strong> components
emFontFamily
String
Your custom font for <Em> components
quoteFontFamily
String
Your custom font for <Quote> components
fontWeightLight
String
Font weight for light text
fontWeightRegular
String
Font weight for regular text
fontWeightMedium
String
Font weight for medium text
fontWeightBold
String
Font weight for bold text
space1
String
Spacing for 1 unit
space2
String
Spacing for 2 units
space3
String
Spacing for 3 units
space4
String
Spacing for 4 units
space5
String
Spacing for 5 units
space6
String
Spacing for 6 units
space7
String
Spacing for 7 units
space8
String
Spacing for 8 units
space9
String
Spacing for 9 units
radiusFactor
String
Radius base variable, used for multiplying.
radiusFull
String
A variable used to calculate a fully rounded radius.
radiusThumb
String
A variable used to calculate radius of a thumb element.
rules
Object
The rules option is a map of CSS-like selectors to CSS properties, allowing granular customization of individual components.
locale
String
Locale code in ISO 639-1 format (en, fr). By default, `en` will be used
layout
Object Hide properties
type
tab | accordion Required
defaultItemsToShow
number
Specifies the number of payment methods to display in the UI. Any additional payment methods appear under an expandable menu.
showRadioButtons
boolean
paymentMethods
Object Hide properties
sortOrder
Array<string>
The sort order for payment methods displayed in the payment component.
Configures the display behavior of the mandate popup.
Allowed Values:
`default` : Displays the default mandate popup.
`never` : Hides the mandate popup.
Object: An object that provides additional properties (see below) to configure the mandate popup.
showMaximumAmount
boolean
Indicates whether to display the maximum allowed amount for the mandate.
upi
Object Hide properties
mandate
Configures the display behavior of the mandate popup.
Allowed Values:
`default` : Displays the default mandate popup.
`never` : Hides the mandate popup.
Object: An object that provides additional properties (see below) to configure the mandate popup.
showMaximumAmount
boolean
Indicates whether to display the maximum allowed amount for the mandate.
netbanking_emandates
Object Hide properties
mandate
Configures the display behavior of the mandate popup.
Allowed Values:
`default` : Displays the default mandate popup.
`never` : Hides the mandate popup.
Object: An object that provides additional properties (see below) to configure the mandate popup.
showMaximumAmount
boolean
Indicates whether to display the maximum allowed amount for the mandate.
paymentIntent
Object Hide properties
id
string Required
form
Object Hide properties
customer
Object Hide properties
firstName
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
lastName
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
phone
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
email
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
payment
Object Hide properties
upi
Object Hide properties
id
Object Hide properties
Allowed Values:
Object
'default'
label
string
readOnly
boolean
short
boolean
placeholder
string
order
number
netbanking_emandates
Object Hide properties
accountNumber
Object Hide properties
Allowed Values:
Object
'default'
label
string
readOnly
boolean
short
boolean
placeholder
string
order
number
ifscCode
Object Hide properties
Allowed Values:
Object
'default'
label
string
readOnly
boolean
short
boolean
placeholder
string
order
number
bankName
Object Hide properties
Allowed Values:
Object
'default'
label
string
readOnly
boolean
short
boolean
placeholder
string
order
number
accountType
Object Hide properties
Allowed Values:
Object
'default'
label
string
readOnly
boolean
short
boolean
placeholder
string
order
number
online_banking_poland
Object Hide properties
bankName
Object Hide properties
Allowed Values:
Object
'default'
label
string
readOnly
boolean
short
boolean
placeholder
string
order
number
billingAddress
Object Hide properties
firstName
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
lastName
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
phone
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
addressLine1
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
addressLine2
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
addressLine3
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
city
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
state
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
stateCode
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
countryCode
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
zip
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
shippingAddress
Object Hide properties
firstName
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
lastName
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
phone
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
addressLine1
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
addressLine2
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
addressLine3
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
city
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
state
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
stateCode
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
countryCode
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
zip
Object Hide properties
Allowed Values:
Object
'default'
'never'
label
string
required
boolean
readOnly
boolean
short
boolean
placeholder
string
order
number
allowedValues
Array<Object>
label
string Required
value
string Required
context
Object Hide properties
cart
Object Hide properties
lineItems
Array<Object>
id
String Required
name
String
description
String
type
Required
Allowed Values:
plan
addon
charge
customer
Object Hide properties
firstName
String
lastName
String
phone
String
email
String
billingAddress
Object Hide properties
firstName
String
First name associated with the address
lastName
String
Last name associated with the address
phone
String
Phone number associated with the shipping address
addressLine1
String
Address line 1 (eg. number, street, etc).
addressLine2
String
Address line 2 (eg. suite, apt #, etc.).
addressLine3
String
Address line 3 (eg. suite, apt #, etc).
city
String
City or locality name
state
String
State
stateCode
String
2 letter code for US states or equivalent
countryCode
String
2 letter country code
zip
String
Zip code or postal code
shippingAddress
Object Hide properties
firstName
String
First name associated with the address
lastName
String
Last name associated with the address
phone
String
Phone number associated with the shipping address
addressLine1
String
Address line 1 (eg. number, street, etc).
addressLine2
String
Address line 2 (eg. suite, apt #, etc.).
addressLine3
String
Address line 3 (eg. suite, apt #, etc).
city
String
City or locality name
state
String
State
stateCode
String
2 letter code for US states or equivalent
countryCode
String
2 letter country code
zip
String
Zip code or postal code
callbacks
Object Hide properties
onError(error)
function
Triggered when there is an error either during the rendering of the payment component or at any time during the entire payment flow.
An optional function executed when the user clicks the payment submit button or, if available, the payment button component. This function is called before the payment flow begins. You can use it to validate user inputs or run other checks that are essential before proceeding with the payment flow. Return a resolved Promise to proceed with the payment flow, or return a rejected Promise to block the flow. The function must return within one second, or Chargebee will mark the Promise as rejected, halting the payment flow. If the Promise is rejected, the onError() callback is triggered with the rejection message.
Limitations
paypal_express_checkout: Contact Support to enable this callback. This callback is not supported for the Adyen payment gateway and is ignored.
apple_pay: This callback is not supported for Apple Pay and is ignored.
The payment button component is a prebuilt UI button that submits the payment form when clicked. It dynamically adjusts based on the selected payment method.
Optional component
The payment button component is optional. You can implement your own custom button. However, if you choose not to use Chargebee’s payment button component, Chargebee will render payment buttons for all wallet-based payment methods selected by the user.
componentType
string Required
Allowed Values:
payment-button
options
Object Required Hide properties
style
Object Hide properties
theme
String
appearance
String
The color scheme for the component.
Allowed Values:
light (default)
dark
accentColor
String
The most dominant color in the component. This color is applied to primary buttons and other interactive elements.
Allowed Values:
indigo (default)
gray
gold
bronze
brown
yellow
amber
orange
tomato
red
ruby
crimson
pink
plum
purple
violet
iris
blue
cyan
teal
jade
green
grass
lime
mint
sky
grayColor
String
The grayscale color used in the component, such as for shadows, out-of-focus elements, disabled elements, and placeholder text. The value auto automatically selects a gray shade that complements the accentColor.
Allowed Values:
auto (default)
gray
mauve
slate
sage
olive
sand
scaling
String
The linear scaling applied to the component. Use this setting to adjust the UI density uniformly across the component.
Allowed Values:
90%
95%
100% (default)
105%
110%
radius
String
Specifies the border-radius factor applied to the component. The resulting border-radius is contextual and varies based on the type of UI element.
Allowed Values:
none
small
medium (default)
large
full
variables
String
accent1
String
Background color 1
accent2
String
Background color 2
accent3
String
Interactive components color 1
accent4
String
Interactive components color 2
accent5
String
Interactive components color 3
accent6
String
Borders and separators color 1
accent7
String
Borders and separators color 2
accent8
String
Borders and separators color 3
accent9
String
Solid color 1
accent10
String
Solid color 2
accent11
String
Accessible text color 1
accent12
String
Accessible text color 2
accentSurface
String
Functional color for surface
accentIndicator
String
Functional color for accent indicator
accentTrack
String
Functional color for accent track
accentContrast
String
Functional color for accent contrast
gray1
String
Gray background 1
gray2
String
Gray background 2
gray3
String
Gray for interactive components 1
gray4
String
Gray for interactive components 2
gray5
String
Gray for interactive components 3
gray6
String
Gray for borders and separators 1
gray7
String
Gray for borders and separators 2
gray8
String
Gray for borders and separators 3
gray9
String
Gray for solid color 1
gray10
String
Gray for solid color 2
gray11
String
Gray for accessible text 1
gray12
String
Gray for accessible text 2
graySurface
String
Gray color for surface
grayIndicator
String
Gray color for accent indicator
grayTrack
String
Gray color for accent track
grayContrast
String
Gray color for accent contrast
colorBackground
String
Page background
colorPanelSolid
String
Solid panel backgrounds, such as cards, tables, popovers, dropdown menus, etc.
colorPanelTranslucent
String
Translucent panel backgrounds, such as cards, tables, popovers, dropdown menus, etc.
colorSurface
String
Form component backgrounds, such as text fields, checkboxes, select, etc.
colorOverlay
String
Dialog overlays
defaultFontFamily
String
Your custom default font
headingFontFamily
String
Your custom font for <Heading> components
codeFontFamily
String
Your custom font for <Code> components
strongFontFamily
String
Your custom font for <Strong> components
emFontFamily
String
Your custom font for <Em> components
quoteFontFamily
String
Your custom font for <Quote> components
fontWeightLight
String
Font weight for light text
fontWeightRegular
String
Font weight for regular text
fontWeightMedium
String
Font weight for medium text
fontWeightBold
String
Font weight for bold text
space1
String
Spacing for 1 unit
space2
String
Spacing for 2 units
space3
String
Spacing for 3 units
space4
String
Spacing for 4 units
space5
String
Spacing for 5 units
space6
String
Spacing for 6 units
space7
String
Spacing for 7 units
space8
String
Spacing for 8 units
space9
String
Spacing for 9 units
radiusFactor
String
Radius base variable, used for multiplying.
radiusFull
String
A variable used to calculate a fully rounded radius.
radiusThumb
String
A variable used to calculate radius of a thumb element.
rules
Object
The rules option is a map of CSS-like selectors to CSS properties, allowing granular customization of individual components.
locale
String
Locale code in ISO 639-1 format (en, fr). By default, `en` will be used
paymentMethods
Object Hide properties
options
Object Hide properties
card
Object Hide properties
text
string
The text appearing on the payment button when the card payment method is selected.
google_pay
Object Hide properties
buttonColor
String
Color of the Google Pay button.
Allowed Values:
default
black
white
buttonType
String
Type of the Google Pay button.
Allowed Values:
long
short
book
buy
checkout
donate
order
pay
plain
subscribe
buttonSizeMode
String
Button size options.
Allowed Values:
static
fill
buttonLocale
String
Locale options for the Google Pay Button.
paypal_express_checkout
Object
bancontact
Object Hide properties
text
string
The text appearing on the payment button when the Bancontact payment method is selected.
ideal
Object Hide properties
text
string
The text appearing on the payment button when the iDEAL payment method is selected.
upi
Object Hide properties
text
string
The text appearing on the payment button when the UPI payment method is selected.
netbanking_emandates
Object Hide properties
text
string
The text appearing on the payment button when the Netbanking E-Mandates payment method is selected.
klarna_pay_now
Object Hide properties
text
string
The text appearing on the payment button when the Klarna Pay Now payment method is selected.
online_banking_poland
Object Hide properties
text
string
The text appearing on the payment button when the Online Banking Poland payment method is selected.
callbacks
Object Hide properties
onError(error)
function
Triggered when there is an error either during the rendering of the payment button component.
The most dominant color in the component. This color is applied to primary buttons and other interactive elements.
Allowed Values:
indigo (default)
gray
gold
bronze
brown
yellow
amber
orange
tomato
red
ruby
crimson
pink
plum
purple
violet
iris
blue
cyan
teal
jade
green
grass
lime
mint
sky
grayColor
String
The grayscale color used in the component, such as for shadows, out-of-focus elements, disabled elements, and placeholder text. The value auto automatically selects a gray shade that complements the accentColor.
Allowed Values:
auto (default)
gray
mauve
slate
sage
olive
sand
scaling
String
The linear scaling applied to the component. Use this setting to adjust the UI density uniformly across the component.
Allowed Values:
90%
95%
100% (default)
105%
110%
radius
String
Specifies the border-radius factor applied to the component. The resulting border-radius is contextual and varies based on the type of UI element.
Allowed Values:
none
small
medium (default)
large
full
variables
String
accent1
String
Background color 1
accent2
String
Background color 2
accent3
String
Interactive components color 1
accent4
String
Interactive components color 2
accent5
String
Interactive components color 3
accent6
String
Borders and separators color 1
accent7
String
Borders and separators color 2
accent8
String
Borders and separators color 3
accent9
String
Solid color 1
accent10
String
Solid color 2
accent11
String
Accessible text color 1
accent12
String
Accessible text color 2
accentSurface
String
Functional color for surface
accentIndicator
String
Functional color for accent indicator
accentTrack
String
Functional color for accent track
accentContrast
String
Functional color for accent contrast
gray1
String
Gray background 1
gray2
String
Gray background 2
gray3
String
Gray for interactive components 1
gray4
String
Gray for interactive components 2
gray5
String
Gray for interactive components 3
gray6
String
Gray for borders and separators 1
gray7
String
Gray for borders and separators 2
gray8
String
Gray for borders and separators 3
gray9
String
Gray for solid color 1
gray10
String
Gray for solid color 2
gray11
String
Gray for accessible text 1
gray12
String
Gray for accessible text 2
graySurface
String
Gray color for surface
grayIndicator
String
Gray color for accent indicator
grayTrack
String
Gray color for accent track
grayContrast
String
Gray color for accent contrast
colorBackground
String
Page background
colorPanelSolid
String
Solid panel backgrounds, such as cards, tables, popovers, dropdown menus, etc.
colorPanelTranslucent
String
Translucent panel backgrounds, such as cards, tables, popovers, dropdown menus, etc.
colorSurface
String
Form component backgrounds, such as text fields, checkboxes, select, etc.
colorOverlay
String
Dialog overlays
defaultFontFamily
String
Your custom default font
headingFontFamily
String
Your custom font for <Heading> components
codeFontFamily
String
Your custom font for <Code> components
strongFontFamily
String
Your custom font for <Strong> components
emFontFamily
String
Your custom font for <Em> components
quoteFontFamily
String
Your custom font for <Quote> components
fontWeightLight
String
Font weight for light text
fontWeightRegular
String
Font weight for regular text
fontWeightMedium
String
Font weight for medium text
fontWeightBold
String
Font weight for bold text
space1
String
Spacing for 1 unit
space2
String
Spacing for 2 units
space3
String
Spacing for 3 units
space4
String
Spacing for 4 units
space5
String
Spacing for 5 units
space6
String
Spacing for 6 units
space7
String
Spacing for 7 units
space8
String
Spacing for 8 units
space9
String
Spacing for 9 units
radiusFactor
String
Radius base variable, used for multiplying.
radiusFull
String
A variable used to calculate a fully rounded radius.
radiusThumb
String
A variable used to calculate radius of a thumb element.
rules
Object
The rules option is a map of CSS-like selectors to CSS properties, allowing granular customization of individual components.
locale
String
Locale code in ISO 639-1 format (en, fr). By default, `en` will be used
paymentIntent
Object Hide properties
id
string Required
paymentMethods
Object Hide properties
sortOrder
Array<string>
The sort order for payment methods displayed in the payment component.
Configures the display behavior of the mandate popup.
Allowed Values:
`default` : Displays the default mandate popup.
`never` : Hides the mandate popup.
Object: An object that provides additional properties (see below) to configure the mandate popup.
showMaximumAmount
boolean
Indicates whether to display the maximum allowed amount for the mandate.
upi
Object Hide properties
mandate
Configures the display behavior of the mandate popup.
Allowed Values:
`default` : Displays the default mandate popup.
`never` : Hides the mandate popup.
Object: An object that provides additional properties (see below) to configure the mandate popup.
showMaximumAmount
boolean
Indicates whether to display the maximum allowed amount for the mandate.
netbanking_emandates
Object Hide properties
mandate
Configures the display behavior of the mandate popup.
Allowed Values:
`default` : Displays the default mandate popup.
`never` : Hides the mandate popup.
Object: An object that provides additional properties (see below) to configure the mandate popup.
showMaximumAmount
boolean
Indicates whether to display the maximum allowed amount for the mandate.
layout
Object Hide properties
type
tab | accordion Required
defaultItemsToShow
number
Specifies the number of payment methods to display in the UI. Any additional payment methods appear under an expandable menu.
Initiates the payment authorization process. Once the user completes the payment, the function calls the onSuccess callback along with authorized paymentIntent.
The most dominant color in the component. This color is applied to primary buttons and other interactive elements.
Allowed Values:
indigo (default)
gray
gold
bronze
brown
yellow
amber
orange
tomato
red
ruby
crimson
pink
plum
purple
violet
iris
blue
cyan
teal
jade
green
grass
lime
mint
sky
grayColor
String
The grayscale color used in the component, such as for shadows, out-of-focus elements, disabled elements, and placeholder text. The value auto automatically selects a gray shade that complements the accentColor.
Allowed Values:
auto (default)
gray
mauve
slate
sage
olive
sand
scaling
String
The linear scaling applied to the component. Use this setting to adjust the UI density uniformly across the component.
Allowed Values:
90%
95%
100% (default)
105%
110%
radius
String
Specifies the border-radius factor applied to the component. The resulting border-radius is contextual and varies based on the type of UI element.
Allowed Values:
none
small
medium (default)
large
full
variables
String
accent1
String
Background color 1
accent2
String
Background color 2
accent3
String
Interactive components color 1
accent4
String
Interactive components color 2
accent5
String
Interactive components color 3
accent6
String
Borders and separators color 1
accent7
String
Borders and separators color 2
accent8
String
Borders and separators color 3
accent9
String
Solid color 1
accent10
String
Solid color 2
accent11
String
Accessible text color 1
accent12
String
Accessible text color 2
accentSurface
String
Functional color for surface
accentIndicator
String
Functional color for accent indicator
accentTrack
String
Functional color for accent track
accentContrast
String
Functional color for accent contrast
gray1
String
Gray background 1
gray2
String
Gray background 2
gray3
String
Gray for interactive components 1
gray4
String
Gray for interactive components 2
gray5
String
Gray for interactive components 3
gray6
String
Gray for borders and separators 1
gray7
String
Gray for borders and separators 2
gray8
String
Gray for borders and separators 3
gray9
String
Gray for solid color 1
gray10
String
Gray for solid color 2
gray11
String
Gray for accessible text 1
gray12
String
Gray for accessible text 2
graySurface
String
Gray color for surface
grayIndicator
String
Gray color for accent indicator
grayTrack
String
Gray color for accent track
grayContrast
String
Gray color for accent contrast
colorBackground
String
Page background
colorPanelSolid
String
Solid panel backgrounds, such as cards, tables, popovers, dropdown menus, etc.
colorPanelTranslucent
String
Translucent panel backgrounds, such as cards, tables, popovers, dropdown menus, etc.
colorSurface
String
Form component backgrounds, such as text fields, checkboxes, select, etc.
colorOverlay
String
Dialog overlays
defaultFontFamily
String
Your custom default font
headingFontFamily
String
Your custom font for <Heading> components
codeFontFamily
String
Your custom font for <Code> components
strongFontFamily
String
Your custom font for <Strong> components
emFontFamily
String
Your custom font for <Em> components
quoteFontFamily
String
Your custom font for <Quote> components
fontWeightLight
String
Font weight for light text
fontWeightRegular
String
Font weight for regular text
fontWeightMedium
String
Font weight for medium text
fontWeightBold
String
Font weight for bold text
space1
String
Spacing for 1 unit
space2
String
Spacing for 2 units
space3
String
Spacing for 3 units
space4
String
Spacing for 4 units
space5
String
Spacing for 5 units
space6
String
Spacing for 6 units
space7
String
Spacing for 7 units
space8
String
Spacing for 8 units
space9
String
Spacing for 9 units
radiusFactor
String
Radius base variable, used for multiplying.
radiusFull
String
A variable used to calculate a fully rounded radius.
radiusThumb
String
A variable used to calculate radius of a thumb element.
rules
Object
The rules option is a map of CSS-like selectors to CSS properties, allowing granular customization of individual components.
locale
String
Locale code in ISO 639-1 format (en, fr). By default, `en` will be used
paymentMethods
Object Hide properties
options
Object Hide properties
card
Object Hide properties
text
string
The text appearing on the payment button when the card payment method is selected.
google_pay
Object Hide properties
buttonColor
String
Color of the Google Pay button.
Allowed Values:
default
black
white
buttonType
String
Type of the Google Pay button.
Allowed Values:
long
short
book
buy
checkout
donate
order
pay
plain
subscribe
buttonSizeMode
String
Button size options.
Allowed Values:
static
fill
buttonLocale
String
Locale options for the Google Pay Button.
paypal_express_checkout
Object
bancontact
Object Hide properties
text
string
The text appearing on the payment button when the Bancontact payment method is selected.
ideal
Object Hide properties
text
string
The text appearing on the payment button when the iDEAL payment method is selected.
upi
Object Hide properties
text
string
The text appearing on the payment button when the UPI payment method is selected.
netbanking_emandates
Object Hide properties
text
string
The text appearing on the payment button when the Netbanking E-Mandates payment method is selected.
klarna_pay_now
Object Hide properties
text
string
The text appearing on the payment button when the Klarna Pay Now payment method is selected.
online_banking_poland
Object Hide properties
text
string
The text appearing on the payment button when the Online Banking Poland payment method is selected.