### [wpforms_stripe_api_payment_intents_set_config_element_style](https://wpforms.com/developers/wpforms_stripe_api_payment_intents_set_config_element_style/)

**Published:** September 30, 2025
**Author:** Umair Majeed

**Content:**

## Description

The `wpforms_stripe_api_payment_intents_set_config_element_style` filter lets you overwrite the Stripe Card Element style object. This allows you to adjust fonts, colors, sizes, and placeholder styling for the Stripe Credit Card field.

The style object uses CSS-like properties that map directly to Stripe Elements’ [Style API](https://stripe.com/docs/js/appendix/style). You can define a `base` style, as well as states like `complete`, `empty`, `focus`, or `invalid`.

parametertypedescription`$styles`arrayThe Stripe Card Element style object.## Source

`wpforms\src\Integrations\Stripe\Api\PaymentIntents.php`

## Example

```

// Customize placeholder text color and font for the Stripe Card Element.
function wpf_dev_stripe_card_field_style( $styles ) {
    $styles['base'] = [
        'fontFamily' => 'Roboto, sans-serif',
        'fontSize'   => '16px',
        'color'      => '#333333',
        '::placeholder' => [
            'color' => '#b95d52',
        ],
    ];
    return $styles;
}
add_filter( 'wpforms_stripe_api_payment_intents_set_config_element_style', 'wpf_dev_stripe_card_field_style' );
```

## Reference Article

- [How to Change the Styling of the Stripe Credit Card Placeholder](https://wpforms.com/developers/how-to-add-change-the-styling-of-the-stripe-credit-card-placeholder/)

**Categories:** Filters Hooks

---

