Skip to main content

SecureFieldsEventsPayload

Payload for each event emitted by the Secure Fields SDK.

Properties

autocomplete

autocomplete: SecureFieldsChangeEventPayload;

Triggered when a field is autocompleted. This include the state of the field on which the change happened but also the state of the other fields.


blur

blur: SecureFieldsChangeEventPayload;

Triggered when a field is blurred/unfocused. This include the state of the field on which the change happened but also the state of the other fields.


brandDetected

brandDetected: object;

Triggered when a brand is detected in the card number field. It can also contain a co-brand if applicable.

NameType
brands?( | "AMERICAN_EXPRESS" | "CARTE_BANCAIRE" | "MASTERCARD" | "VISA" | "MAESTRO" | "DINERS_CLUB" | "DISCOVER" | "UNIONPAY" | "JCB")[]

change

change: SecureFieldsChangeEventPayload;

Triggered when a field changes(focus, blur, keyup, keydown, autocomplete).

This include the state of the field on which the change happened but also the state of the other fields.


error

error: object;

Triggered for multiple errors while using the SDK.

NameType
code?string
messagestring
payload?any

focus

focus: SecureFieldsChangeEventPayload;

Triggered when a field is focused This include the state of the field on which the change happened but also the state of the other fields.

See

SecureFieldsChangeEventPayload


formValid

formValid: object;

Triggered when the form validation changes. It's fired once at initialization with false and then on every change.

NameType
fields?object
fields.cardNumber?object
fields.cardNumber.length?number
fields.cardNumber.valid?boolean
fields.cvv?object
fields.cvv.length?number
fields.cvv.valid?boolean
hasErrorsboolean

keydown

keydown: SecureFieldsChangeEventPayload;

Triggered when a key is pressed down in a field. This include the state of the field on which the change happened but also the state of the other fields.


keyup

keyup: SecureFieldsChangeEventPayload;

Triggered when a key is pressed in a field. This include the state of the field on which the change happened but also the state of the other fields.


ready

ready: void;

Triggered when the provider vaultSDK has been loaded and is ready to use.


success

success: object;

Triggered when the submission has been successful

NameType
card?CardInfo
vault_form_tokenstring

Returns

The vault_form_token is the identifier for the vault form, and card contains information about the card such as the masked bin, the last digit and the detected brands.