Skip to main content

SecureFieldsConfig

Configuration for the Vault SDK Adapter.

Properties

brands

brands: Brand[];

Eligible card networks for the vault form.


brandSelector?

optional brandSelector: boolean;

Enable or disable the brand selector feature. When enabled, a brand selector UI will be displayed to the user. If disabled,

  • you can listen the brandDetected event to get the detected brand(s).
  • you must provide the selectedNetwork parameter when calling the submit method.

fields

fields: object;

Targets and labels for the iframe fields. The 'cvv' field is required; 'cardNumber' is optional.

NameType
cardNumber?SecureFieldsFieldConfig
cvvSecureFieldsFieldConfig
expDate?SecureFieldsFieldConfig
holderName?SecureFieldsFieldConfig

styles?

optional styles: object;

Applicable styles for the iframe fields. You can specify pseudo classes

NameType
fontSrc?string
inputSecureFieldsStyles & object

Example

styles: {
fontSrc: 'https://example.com/fonts.css',
input: {
fontSize: '16px',
color: '#333',
':focus': {
color: '#000',
},
'::placeholder': {
color: '#999',
},
},
}

CSS pseudoclasses supported:

  • :empty
  • :focus
  • :valid
  • :invalid
  • :autocomplete // alias for :-webkit-autofill
  • ::placeholder