Created with Sketch.
Created with Sketch.
Estonia Checkout

Custom CSS Styles

The Checkout Estonia is styled in a way that it can be used conveniently on both desktop and mobile devices. It is however possible to define custom CSS styles, in order to make the form look & feel more like a partner’s page that redirects to it. A custom styles can be provided in following ways:

  • Partial customisation of default styles. In this case, the default style is partially changed, allowing to override specific default settings, other settings will remain the same. This way, partners can easily make minor modifications such as unifying fonts and colours with their site.
  • Extensive customisation of default styles. List of all customisable default styles is available to be overridden by the styles provided by a partner. We recommend to use the first option whenever possible.

JSON object containing custom CSS styles must be uploaded to /api/Partner/customstyles. Partner has to use access token in order to get authorised with our backend application, see Embed Checkout Estonia. Additionally during the payment initialisation, partner should send useCustomStylesflag. In case flag is not provided during the initialisation, or is sent as false defaults are used automatically. (see Embed Checkout Estonia)

Partial customisation of default styles

Example of changing font families globally for the Checkout Estonia:

# Save custom styles JSON for Checkout Estonia
POST {api_url}/api/Partner/customstyles
Content-type: application/json
Authorization: Bearer {partner_access_token} 

{
    "fontFamilies": [
        "Arial Black",
        "Gadget",
        "sans-serif"
    ],
}

Adjust the payment initialisation call accordingly and set useCustomStylesto true:

# Initialise payment
POST {api_url}/api/Partner/payment
Content-type: application/json
Authorization: Bearer {partner_access_token} 

{
  "items": [
    {
      "description": "string",
      "amount": 0,
      "taxAmount": 0,
      "taxCode": "string",
      "notes": "string"
    }
  ],
  "orderReference": "string",
  "merchantUrl": "string",
  "campaignCode": "string",
  "useCustomStyles": true
}

List of properties

Buttons

Every button in the application is one of a two variants : primary,secondary. Partner is able to customise following css properties for the variants:

Property
Value
buttons.primary.base{}
buttons.primary.base.backgroundColorHex color string
Example: "#FFF"
buttons.primary.base.borderColorHex color string
Example: "#000"
buttons.primary.base.colorHex color string
Example: "#4C4C4C"
buttons.primary.minHeightFloat number
buttons.primary.lineHeightFloat number
buttons.primary.fontWeightInteger number
buttons.primary.fontSizeFloat number
buttons.primary.borderWidthFloat number
buttons.primary.boxShadow{}
buttons.primary.boxShadow.hOffsetFloat number
buttons.primary.boxShadow.vOffsetFloat number
buttons.primary.boxShadow.blurFloat number
buttons.primary.boxShadow.spreadFloat number
buttons.primary.boxShadow.colorHex color string
Example: "#FFF"
buttons.primary.padding{}
buttons.primary.padding.topFloat number
buttons.primary.padding.rightFloat number
buttons.primary.padding.bottomFloat number
buttons.primary.padding.leftFloat number
buttons.primary.hover{}
buttons.primary.hover.backgroundColorHex color string
Example: "#FFF"
buttons.primary.hover.borderColorHex color string
Example: "#FFF"
buttons.primary.hover.colorHex color string
Example: "#FFF"
buttons.primary.disabled{}
buttons.primary.disabled.backgroundColorHex color string
Example: "#FFF"
buttons.primary.disabled.borderColorHex color string
Example: "#FFF"
buttons.primary.disabled.colorHex color string
Example: "#FFF"
buttons.primary.borderRadiusFloat number

Font Families

Partner can specify font families used in the application

PropertyValue
fontFamiliesList of Strings with font family names
Example : ["Lato", "Helvetica"]

Headings

Heading variants that be customized: h1, h2, h3, h4. Each variant can specify following css properties:

PropertyValue
headings.h1.fontSizeFloat number
headings.h1.lineHeightFloat number
headings.h1.displayString specifying display css style
Examples: "block"; "none"; "flex";
headings.h1.fontWeightInteger number
headings.h1.colorHex color string
Example: "#FFF"

Inputs

Global css styles for inputs consist of following css properties:

PropertyValue
input.heightFloat number
input.fontSizeFloat number
input.fontWeightInteger number
input.borderColorHex color string
Example: "#FFF"
input.borderWidthFloat number
input.placeholderColorHex color string
Example: "#FFF"
input.disabled{}
input.disabled.backgroundColorHex color string
Example: "#FFF"
input.disabled.borderColorHex color string
Example: "#FFF"
input.disabled.colorHex color string
Example: "#FFF"

Variants: black, primary. Each variant can have following css properties:

PropertyValue
links.black.fontSizeFloat number
links.black.fontWeightFloat number
links.black.colorHex color string
Example: "#FFF"
links.black.textDecoration
String specifying text decoration css style
Example: "none"; "underline";
links.black.hover{}
links.black.hover.colorHex color string
Example: "#FFF"
links.black.hover.textDecorationString specifying text decoration css style
Example: "none"; "underline";
links.black.disabled{}
links.black.disabled.colorHex color string
Example: "#FFF"
links.black.disabled.textDecorationString specifying text decoration css style
Example: "none"; "underline";

Checkboxes

Following checkbox types are used in the application: primary, secondary. Partners can change one or both checkboxes and replace them with their custom checkboxes. Please make sure to provide all six variants of icons for checked, unchecked, checkedDisabled, uncheckedDisabled, checkedInvalid and uncheckedInvalid checkboxes in order to preserve the style at all times while actions are performed in the application.

PropertyValue
checkbox.primary{}
checkbox.primary.widthFloat number
checkbox.primary.heightFloat number
checkbox.primary.checked{}
checkbox.primary.checked.backgrondUrlString specifying a public URL to an icon image – use only backgroundUrl or only color
Example: "https://avdonl0p0documentation.blob.core.windows.net/static/default_ch_est_CheckboxPrimaryChecked.svg"
checkbox.primary.checked.colorTo use default icon with customized color – use only backgroundUrl or only color
Hex color string
Example: "#FFF"
checkbox.primary.unchecked{}
checkbox.primary.unchecked.backgroundUrlString specifying a public URL to an icon image – use only backgroundUrl or only color
Example: "https://avdonl0p0documentation.blob.core.windows.net/static/default_ch_est_CheckboxPrimaryUnchecked.svg"
checkbox.primary.unchecked.colorTo use default icon with customized color – use only backgroundUrl or only color
Hex color string
Example: "#FFF"
checkbox.primary.checkedDisabled{}
checkbox.primary.checkedDisabled.backgroundUrlString specifying a public URL to an icon image – use only backgroundUrl or only color
Example: "https://avdonl0p0documentation.blob.core.windows.net/static/default_ch_est_CheckboxPrimaryCheckedDisabled.svg"
checkbox.primary.checkedDisabled.colorTo use default icon with customized color – use only backgroundUrl or only color
Hex color string
Example: "#FFF"
checkbox.primary.uncheckedDisabled{}
checkbox.primary.uncheckedDisabled.backgroundUrlString specifying a public URL to an icon image – use only backgroundUrl or only color
Example: "https://avdonl0p0documentation.blob.core.windows.net/static/default_ch_est_CheckboxPrimaryUncheckedDisabled.svg"
checkbox.primary.uncheckedDisabled.colorTo use default icon with customized color – use only backgroundUrl or only color
Hex color string
Example: "#FFF"
checkbox.primary.checkedInvalid{}
checkbox.primary.checkedInvalid.backgroundUrlString specifying a public URL to an icon image – use only backgroundUrl or only color
Example:
"https://avdonl0p0documentation.blob.core.windows.net/static/default_CheckboxRedChecked.svg"
checkbox.primary.checkedInvalid.colorTo use default icon with customized color – use only backgroundUrl or only color
Hex color string
Example: "#FFF"
checkbox.primary.uncheckedInvalid{}
checkbox.primary.uncheckedInvalid.backgroundUrlString specifying a public URL to an icon image – use only backgroundUrl or only color
Example:
"https://avdonl0p0documentation.blob.core.windows.net/static/default_ch_est_CheckboxRedUnchecked.svg"
checkbox.primary.uncheckedInvalid.colorTo use default icon with customized color – use only backgroundUrl or only color
Hex color string
Example: "#FFF"
checkbox.primary.focusOutlineColorHex color string
Example: "#FFF"
checkbox.primary.checkedLabelColorHex color string
Example: "#FFF"

Labels customization

Variants: active, disabled, error. Each variant can have following css properties:

PropertyValue
labels.active.colorHex color string
Example: "#FFF"

Header

Header customisation

PropertyValue
header.backgroundColorHex color string
Example: "#FFF"
header.fontColorHex color string
Example: "#FFF"
header.activeLanguageUnderlineColorHex color string
Example: "#FFF"
header.customerNameColorHex color string
Example: "#FFF"
header.logo{}
header.logo.backgroundUrlString specifying a public URL to an icon image
Example: "https://avdonl0p0documentation.blob.core.windows.net/static/Elm_logo.svg.png"
header.logo.widthFloat number
header.logo.heightFloat number
header.mobileMenuBorderColorHex color string
Example: "#FFF"

Extensive customisation of default styles

Please refer to our default_styles.json file, containing all available customizable CSS properties.

Please note that due to the nature of the application, the styles may change without prior notice.