Skip to main content

Style the Stitch payment form

Stable CSS selectors​

SelectorElement
#wc-stitch-formPayment form fieldset (classic and Blocks)
.stitch-payment-headerLogo, accepted cards, description
.stitch-payment-descriptionIn-form payment description
.wc-stitch-saved-methodsSaved payment method list
.wc-stitch-new-methodNew card fields container
.stitch-card-previewAnimated card preview
#stitch-card-number-iframeCardPointe tokenizer mount
#stitch-surcharge-noticeSurcharge disclosure notice
.stitch-field-errorInline validation message
.stitch-error-noticeForm-level error summary

Registered stylesheets​

HandlePurpose
stitch-payments-gatewayMain checkout form styles
stitch-payments-card-previewCard preview (when enabled in settings)
stitch-payments-adminGateway settings screen only

Example: theme CSS​

#wc-stitch-form .stitch-payment-header {
border-radius: 16px;
}

#wc-stitch-form .stitch-form-row label {
font-weight: 600;
color: #0f172a;
}

Card number iframe​

The card number field lives inside a CardPointe iframe. Style it via the stitch_payments_iframe_css filter:

add_filter( 'stitch_payments_iframe_css', function ( $css ) {
return $css . 'input{font-size:16px;}';
} );

CardPointe only accepts inline CSS through the tokenizer URL parameter. Do not use double quotes in the CSS (for example around multi-word font names) — CardPointe rejects the entire stylesheet when quotes are present. Use unquoted names such as Segoe UI instead.

See the CardPointe hosted iframe tokenizer documentation.

Validation states​

The classic form applies classes on valid/invalid fields:

  • .stitch-input-wrapper.valid / .invalid
  • #stitch-card-number-iframe.valid / .invalid

Match these in your theme for consistent feedback colors.

Checkout field focus (classic)​

stitch-gateway.js auto-advances focus when fields validate:

FieldAdvance when
Card numberTokenizer reports a valid token
ExpiryMM/YY format validates
CVV3 digits (4 for Amex)
Cardholder nameManual entry only (no auto-advance after)

There is no filter to disable this today; customize behavior by dequeuing stitch-gateway.js and providing your own script only if you accept maintaining tokenizer integration.