1. Layouts
Choose a layout that fits well with your UI pattern. There are two types of layout options as listed below. The layout defaults to accordion if not explicitly specified.1.1 Accordion Layout
The accordion layout displays payment methods vertically using an accordion. To use this layout, set the value forlayout to accordion. You also have the option to specify other properties, such as those shown in the following example:
1.2 Tabs Layout
The tabs layout displays payment methods horizontally using tabs. To use this layout, set the value forlayout to tabs. You also have the option to specify other properties, such as tabs or collapsed:
2. Wallets
The wallet customization feature lets users configure payment options like Apple Pay, Google Pay, PayPal, and Klarna. It includes awalletReturnUrl for post-payment redirects and a style property to customize the wallet’s appearance, offering flexibility for seamless integration:
3. Styling Variables
The Styling APIs can be used to blend the Unified Checkout with the rest of your app or website.4. Rules
Therules 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).
Supported Class Names
Tabs
Form Inputs
Checkbox
InputLogo
Other Elements
Example Usage
5. Languages
vaultera Switch Unified Checkout supports localization in multiple languages. By default, the Unified Checkout SDK will detect the locale of the customer’s browser and display the localized version of the payment sheet if that locale is supported. In case it is not supported, we default to English. To override, you can send locale inhyper.elements(options).
Supported Locales
- Arabic (ar)
- Catalan (ca)
- Chinese (zh)
- German (de)
- Dutch (nl)
- English (en)
- English GB (en-GB)
- French Belgium (fr-BE)
- French (fr)
- Hebrew (he)
- Italian (it)
- Japanese (ja)
- Polish (pl)
- Portuguese (pt)
- Russian (ru)
- Spanish (es)
- Swedish (sv)
6. Confirm Button
The Styling APIs can be used to blend the Confirm Payment Button (handled by SDK) with your app.7. More Configurations
Branding
You can decide whether to display the Vaultera Switch branding using thebranding prop:
Payment Methods Header Text
Customize the header text for the section displaying available payment methods:Saved Payment Methods Header Text
Customize the header text for the section displaying saved payment methods:Custom Message for Card Terms
We provide a default message for card terms:customMessageForCardTerms property:
Hide Card Nickname Field
ThehideCardNicknameField property allows you to hide the card nickname field when saving a card:
Hide Expired Saved Payment Methods
ThehideExpiredPaymentMethods property allows you to control whether expired saved payment methods are hidden or not:
Show Card Form by Default
TheshowCardFormByDefault property determines whether the card form is displayed by default or not:
Terms
Theterms property allows you to configure the display of terms for various payment methods:
Display Saved Payment Methods
ThedisplaySavedPaymentMethods property determines whether saved payment methods are displayed:
Display Saved Payment Methods Checkbox
ThedisplaySavedPaymentMethodsCheckbox property determines whether the “Save payment methods” checkbox is displayed:
Payment Method Order
ThepaymentMethodOrder property allows you to specify the order in which payment methods are displayed:
Business
Thebusiness 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:
Read Only
ThereadOnly property puts the SDK into read-only mode, disabling all interactions:
Show Short Surcharge Message
TheshowShortSurchargeMessage 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: