Hosted Card Payment Fields

Build and customize a card payment form with Lemonway Hosted Fields.

Build a card payment form with Lemonway Hosted Fields while card data remains in Lemonway-hosted iframes.

Hosted Fields lets you configure individual payment fields and mount them in your checkout. Use the SDK’s event hooks and CSS class toggling to respond to field state and style the outer containers.

Before you start

Building a payment form

  1. Configure the fields that your checkout requires, such as card number, expiration date, CVV, and cardholder name.
  2. Mount the configured fields into the containers on your payment page.
  3. Submit the form through the SDK. See Submit a form.
  4. Redirect the payer according to the submission result when your payment flow requires it.

Handling field state

Use event hooks to respond to changes inside the hosted iframes, including form readiness, focus, and validation state. See Event hooks.

Use CSS class toggling to apply styles to field containers as their state changes. See Toggling classes.

Customizing fields

You can configure the following aspects of a Hosted Fields integration:

  • Field labels and placeholders
  • Styles for the iframe content, subject to CSS sanitization
  • The appearance of outer field containers
  • Language-specific placeholders and right-to-left text styling
  • Card scheme detection for supported co-branded cards

See Styling with SDK, Internationalization, and Card scheme detection.

Optional: Using synthetic events

Synthetic events let the container of a hosted field emit events that mirror events inside the iframe. Use them when your front-end implementation needs to react to field input, focus, blur, validity, or empty-state changes.

See Synthetic events.


Did this page help you?