Skip to Content
Docs

Payment methods

Style the wallet button container, the payment form container, APM input fields, and section dividers in the Universal checkout form.

The checkout form displays wallet buttons, alternative payment method buttons, APM input fields, and section dividers outside the card form area. Use the style keys on this page to control how each of these regions looks.

Wallet buttons

The apmButtons key styles the container that wraps wallet buttons (Google Pay, Apple Pay).

style: {
  apmButtons: {
    borderRadius: '8px',
    padding: '12px',
    backgroundColor: '#f9fafb',
  }
}

Payment form container

The expressCheckout key styles the large container that wraps the alternative payment method buttons (for example, Neosurf and paysafecard), the "Pay with" and "Pay with card" dividers, and the card form.

style: {
  expressCheckout: {
    borderRadius: '8px',
    padding: '12px',
    backgroundColor: '#f9fafb',
  }
}

APM input fields

When a customer selects an APM, the form can render additional input fields, such as a bank selector for iDEAL.

The paymentMethodFields key styles the input fields that APMs render in the radio layout (alternatives: 'radio' on checkout.universal()). It has no effect in the default button layout:

style: {
  paymentMethodFields: {
    label: {
      color: '#6b7280',
      fontSize: '12px',
      fontWeight: '500',
    },
    input: {
      border: '1px solid #d1d5db',
      borderRadius: '8px',
    }
  }
}

Section dividers

Dividers are the horizontal lines with text labels that separate sections of the form. There are four named dividers:

KeyPosition
dividers.payWithBetween the wallet button and the alternative payment method buttons.
dividers.payWithCardBetween the alternative payment method buttons and the card form.
dividers.savedPaymentMethodsAbove the saved payment methods list. Only visible when the customer has saved cards.
dividers.showOtherWaysToPayAppears when a customer has saved cards. Clicking it expands the full form with APMs and the card form.

Each divider accepts a text key for the label and a divider key for the line:

style: {
  dividers: {
    payWith: {
      text: { color: '#9ca3af', fontSize: '12px' },
      divider: { color: '#e5e7eb', height: '1px' }
    },
    payWithCard: {
      text: { color: '#9ca3af', fontSize: '12px' },
      divider: { color: '#e5e7eb', height: '1px' }
    },
    savedPaymentMethods: {
      text: { color: '#9ca3af', fontSize: '12px' },
      divider: { color: '#e5e7eb', height: '1px' }
    },
    showOtherWaysToPay: {
      text: { color: '#9ca3af', fontSize: '12px' },
      divider: { color: '#e5e7eb', height: '1px' }
    }
  }
}

Next steps

Was this page helpful?