Payment capture page Styling

Payment capture page supports styling customization. This allows you to tailor the look and feel of the page to match your brand or your merchants' preferences.

Get Started

  1. Preview and Configure
    Use the demo page to experiment with different styling configurations. This interactive tool lets you see how various settings affect the appearance of the Payment Capture Page.

  2. Generate Styling JSON
    Once you're satisfied with the design, generate the styling JSON and use it in next step to obtain the stylingId.

  3. Submit to Styling API
    Create a styling with the API and use the generated JSON in the payload. Store the id returned in the response. This is the stylingId that you would append to the Payment capture page link.

    {
      "name": "Dark_Theme",
      "memo": "Dark Theme",
      "cssVariables": {
        "--fontFamily": "Inter",
        "--fontSizeBase": "16px",
        "--fontSizeHeading1": "1.25rem",
        "--fontSizeHeading2": "1rem",
        "--fontSizeHeading3": "0.875rem",
        "--fontSizeHeading4": "0.75rem",
        "--spacingUnit": "0.25rem",
        "--borderRadius": "0.5rem",
        "--borderWidth": "1px",
        "--borderColor": "#424242",
        "--colorPrimary": "#F97316",
        "--colorTextTitle": "#fafafa",
        "--colorTextGeneral": "#a1a1a1",
        "--colorTextSubtitle": "#a1a1a1",
        "--colorPlaceholder": "#a1a1a1",
        "--colorInputValue": "#fafafa",
        "--colorInputBorder": "#424242",
        "--colorTextHeading1": "#fafafa",
        "--colorTextHeading2": "#fafafa",
        "--colorBackgroundPage": "#0a0a0a",
        "--colorBackgroundContainerPrimary": "#17171717",
        "--colorBackgroundContainerSecondary": "#212121",
        "--colorBackgroundContainerHover": "#656565",
        "--colorDanger": "#DC2626"
      },
      "cssClasses": {}
    }
    {
      "data": {
        "id": "7a9020cb-c8eb-4d70-980f-6df7d0aae9f1",
        "name": "Dark Theme",
        "createdByUser": "[email protected]",
        "memo": "Dark Theme",
        "cssClasses": {},
        "cssVariables": "{\"--fontFamily\":\"Inter\",\"--fontSizeBase\":\"16px\",\"--fontSizeHeading1\":\"1.25rem\",\"--fontSizeHeading2\":\"1rem\",\"--fontSizeHeading3\":\"0.875rem\",\"--fontSizeHeading4\":\"0.75rem\",\"--spacingUnit\":\"0.25rem\",\"--borderRadius\":\"0.5rem\",\"--borderWidth\":\"1px\",\"--borderColor\":\"#424242\",\"--colorPrimary\":\"#F97316\",\"--colorTextTitle\":\"#fafafa\",\"--colorTextGeneral\":\"#a1a1a1\",\"--colorTextSubtitle\":\"#a1a1a1\",\"--colorPlaceholder\":\"#a1a1a1\",\"--colorInputValue\":\"#fafafa\",\"--colorInputBorder\":\"#424242\",\"--colorTextHeading1\":\"#fafafa\",\"--colorTextHeading2\":\"#fafafa\",\"--colorBackgroundPage\":\"#0a0a0a\",\"--colorBackgroundContainerPrimary\":\"#17171717\",\"--colorBackgroundContainerSecondary\":\"#212121\",\"--colorBackgroundContainerHover\":\"#656565\",\"--colorDanger\":\"#DC2626\"}",
        "lastUpdatedByUser": null,
        "createdAt": "2026-07-21T08:20:51.484Z",
        "updatedAt": "2026-07-21T08:20:51.484Z"
      },
      "status": 200
    }
  4. Apply Styling to Payment Capture Page
    Include the stylingId in the Payment Capture Page parameters to apply the custom styling.

    https://hosted-global-sandbox.ezypay.com/paymentmethod/embed?token={{jwt_token}}&stylingId={{styleId}}

Working with Styling IDs

Ezypay supports multiple Styling IDs, allow you to manage different visual configurations and apply them Same Styling ID can be reused across multiple merchant accounts, giving you flexibility without duplication.

This approach helps Payment capture pages maintain visual consistency with your platform's design system.

Common scenarios:

  • Dark and light theme variations
  • Brand-specific styling
  • Responsive designs for mobile and desktop

You can retrieve the actual cssVariables or cssClasses for any Styling ID using the retrieve styling API. This means you only need to store the Styling ID itself and fetch the underlying CSS on demand through the API. Include a meaningful description when creating the style. This will make it much easier to identify its purpose when retrieving it.

Customisable Styling Variables

The table below lists all the styling variables (cssVariables) you can configure via the Styling API:

VariableTypeExampleDescription
--fontFamilystringInterBase font family. Only fonts retrievable from fonts.googleapis.com/css2 are allowed.
--fontSizeBasestring (CSS size)16pxBase font size. Change this value to scale all text sizes.
--fontSizeHeading1 – --fontSizeHeading4string (CSS size)1.25remHeading sizes.
--spacingUnitstring (CSS size)0.25remBase spacing multiplier.
--borderRadiusstring (CSS size)0.5remCorner rounding.
--borderWidthstring (CSS size)1pxBorder thickness.
--borderColorstring (hex)#E0E6EBBorder color.
--colorPrimarystring (hex)#F97316Primary brand/accent color.
--colorTextTitle / --colorTextGeneral / --colorTextSubtlestring (hex)#111827Text color tiers.
--colorTextHeading1 / --colorTextHeading2string (hex)#111827Heading text colors.
--colorBackgroundPage / --colorBackgroundContainerPrimary / --colorBackgroundContainerSecondary / `--colorBackgroundContainerHoverstring (hex)#FFFFFFBackground layers

**Even you only need to customise a single variables, you will need to provide all the variables with their default value to the styling API.

Customisable CSS Class

If you are not satisfied with the variables above, you could customised the CSS based on the relevant cssClasses. Add this in when you are requesting for a styling ID. Note that we have block some CSS property, they will not take effect even if you pass them in.

  1. Form Elements

    ClassDescriptionPseudo-classesPseudo-elementsStates
    .InputLabelInput field container:hover, :focus::placeholder, ::prefix--invalid ,--withPrefix
    .InputLabelInput field labels:hover, :focus--invalid
    .InputErrorError message styling:hover, :focus
    .SubmitButtonSubmit button:hover, :focus, :disabled
    .RadioButtonRadio button container:hover, :focus
    .RadioButtonInnerInner circle of radio button--selected, --disabled
    .CheckboxContainerCheckbox container:hover
    .CheckboxInputCheckbox input element:hover, :focus--checked, --disabled
    .CheckboxLabelCheckbox label:hover, :focus
  2. Accordion Components

    ClassDescriptionPseudo-classesPseudo-elementsStates
    .AccordionItemIndividual accodion item:hover, :focus
    .AccordionContentAccordion content area:hover, :focus
    .AccordionTriggerAccordion trigger button:hover, :focus
    .AccordionTriggerLabelAccordion trigger label
  3. Payment Method Accordion Components

    ClassDescriptionPseudo-classesPseudo-elementsStates
    .MethodAccordionItemPayment method accordion item:hover, :focus
    .MethodAccordionTriggerpayment method accordion trigger:hover, :focus
    .MethodAccordionTriggerLabelPayment method accordion trigger label
    .MethodAccordionTriggerDescriptionPayment method accordion description
    .MethodAccordionContentPayment method accordion content area:hover, :focus
  4. Information Accordion Components

    ClassDescriptionPseudo-classesPseudo-elementsStates
    .InformationAccordionItemInformation accordion item:hover, :focus
    .InformationAccordionTriggerInformation accordion trigger:hover, :focus
    .InformationAccordionTriggerLabelInformation accordion trigger label
    .InformationAccordionContentInformation accordion content
  5. Ezypay Contact Details Components

    ClassDescriptionPseudo-classesPseudo-elementsStates
    .EzypayDetailsLabelEzypay details label
    .EzypayDetailsContentEzypay details content
    .EzypayEmailEzypay email link:hover
  6. Terms & conditions Components

    ClassDescriptionPseudo-classesPseudo-elementsStates
    .TermsLabelTerms and conditions label
    .TermsLinkTerms and conditions link:hover
  7. Submit Results Components

    ClassDescriptionPseudo-classesPseudo-elementsStates
    .SubmitResultsIconIcon in submit results
    .SubmitResultsIconBackgroundBackground for submit results icon
    .SubmitResultsTitleTitle in submit results
    .SubmitResultsContentContent in submit results

Did this page help you?