createCheckout(), the SDK
renders a complete payment UI inside your container. Learn what the default checkout includes and how
to customize it.
Default styles
Out of the box,createCheckout() applies the default CSS styles and renders:
- An accordion with radio-button selection between available payment methods.
- A card form with number, expiry, and CVV fields.
- PayPal, Google Pay, and Apple Pay buttons in their own accordion sections.
- Loading spinners, error containers, and a success screen.
- A responsive layout with a mobile breakpoint at 768 px.
Override CSS
The default checkout renders elements with.ff-* CSS
classes you can target for visual overrides:
| Class | Purpose |
|---|---|
.ff-skin-default | Top-level container (max-width: 400px, centered) |
.ff-payment-method-card | Payment method card (hidden until .visible) |
.ff-payment-method-card.expanded | Accordion expanded state |
.ff-payment-method-radio | Custom radio button |
.ff-payment-method-label | Row with radio button and header |
.ff-payment-method-content | Animated accordion panel |
.ff-card-form-container | Card form wrapper |
.ff-card-form-submit-button | Submit button |
.ff-card-form-label | Input labels |
.ff-card-form-text-input | Native inputs (cardholder, email) |
.ff-card-form-text-input.error | Error state for native inputs |
.ff-security-message | Security message below forms |
.ff-payment-features | Checkmark list per payment method |
.payment-errors-container | Error message area |
.loader-container | Full overlay with loading spinner |
Customize checkout
For full control over the checkout UI, provide bothcardSelectors and paymentButtonSelectors to
createCheckout(). The SDK skips the default UI entirely
and injects payment inputs into your own HTML elements.
Card selectors
Card selectors are resolved relative to thecontainer
element.
An empty
div where the hosted card number input is
injected.An empty
div for the hosted expiry input.An empty
div for the hosted CVV input.A
button element. The SDK hooks its click event for
form submission.An
input element. The SDK reads its value directly.An
input element. The SDK reads its value directly.Card selectors example
Card selectors example
Payment button selectors
Payment button selectors are resolved relative todocument, not the container.
A
div for the PayPal button.A
div for the Google Pay button.A
div for the Apple Pay button.CheckoutError.
Payment button selectors example
Payment button selectors example
Payment method order
ThepaymentMethodOrder array controls the display order
of payment methods in the checkout accordion.
By default, it shows: APPLE_PAY > GOOGLE_PAY > PAYPAL > PAYMENT_CARD.
Card form
Customize card form fields visibility.Cardholder name field
The cardholder name field visibility is controlled by the server response by default. Override it using therequired parameter:
- true: Show and require the field.
- false or unset: Hide the field.
Email address field
The email field is also server-controlled by default. Override it to show an email input in the card form: Setvisible: true to render an email input
pre-populated with the customer.email value.
Use template to optionally format the email before
sending it as the payment email address. Any occurrence
of {{email}} is replaced with the actual email.
Payment button
Each payment method button accepts styling options that are passed to the underlying payment provider SDK.Apple Pay
By default,buttonStyle is set to black, but you can optionally use white or white-outline.
PayPal
Customize the PayPal button appearance and payment flow.| Option | Values | Default |
|---|---|---|
buttonColor | 'gold', 'blue', 'silver', 'black', 'white' | 'gold' |
buttonShape | 'pill', 'rect' | 'pill' |
buttonLabel | 'pay', 'checkout', 'buynow', 'paypal' | 'pay' |
buttonSize | 'small', 'medium', 'large' | 'large' |
buttonHeight | Pixel value | 54 |
paymentFlow | 'PREFER_VAULT', 'DEFAULT' | 'PREFER_VAULT' |
Google Pay
Customize the Google Pay button appearance and sizing.| Option | Values | Default |
|---|---|---|
buttonColor | 'black', 'white' | 'black' |
buttonSizeMode | 'fill', 'static' | 'fill' |
buttonType | 'pay', 'book', 'buy', 'checkout', 'donate', 'order', 'plain', 'subscribe' | 'pay' |
Card input
Card number, expiry, and CVV fields are rendered inside iframes by the payment provider, so regular CSS cannot reach them. Use thestyle option to control their appearance:
base object also supports fontSize, color,
fontFamily, and fontWeight.
By default, SDK applies the following styles:
| Property | Base state | Error state |
|---|---|---|
borderWidth | '1px' | — |
borderStyle | 'solid' | — |
borderColor | 'rgb(0 0 0 / 10%)' | 'rgb(227, 47, 65)' |
height | '36px' | — |
paddingHorizontal | 10 | — |
borderRadius | '6px' | — |
The cardholder name and email inputs are native HTML
input elements. Style them with CSS using the .ff-card-form-text-input class, not through the style
option.Single payment method
UseBilling.initMethod() to render a single payment
method into your own container:
PAYMENT_CARD, PAYPAL,
GOOGLE_PAY, APPLE_PAY.
For PAYMENT_CARD, the SDK renders a card form (number,
expiry, CVV, optional cardholder name, optional email)
inside the container. For PAYPAL, GOOGLE_PAY, and
APPLE_PAY, the payment button is rendered directly.
The returned interface provides:
setDisabled(disabled): Enable or disable the payment method.submit(): Programmatically trigger form submission (card payments only).destroy(): Clean up and remove the payment method.
