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
Triggered when a brand is detected in the card number field.
It can also contain a co-brand if applicable.
Name | Type |
---|
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
Triggered for multiple errors while using the SDK.
Name | Type |
---|
code? | string |
message | string |
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
Triggered when the form validation changes.
It's fired once at initialization with false
and then on every change.
Name | Type |
---|
fields? | object |
fields.cardNumber? | object |
fields.cardNumber.length? | number |
fields.cardNumber.valid? | boolean |
fields.cvv? | object |
fields.cvv.length? | number |
fields.cvv.valid? | boolean |
hasErrors | boolean |
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
Triggered when the provider vaultSDK has been loaded and is ready to use.
success
Triggered when the submission has been successful
Name | Type |
---|
card? | CardInfo |
vault_form_token | string |
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.