Methods#
Focus#
focus(fieldType): Promise<void>Focuses a hosted field of the specified type.Parameters#
Returns#
Promise<void> – Resolves when the field is focused.
Throws#
ERRORS.E010 – If an error occurs while focusing the field. Example#
Returns the validation state of all fields.Returns#
Example#
onFieldBlur#
onFieldBlur(event, fieldType?): voidEmits an event when a field loses focus.Parameters#
event: (fieldEvent) => void – Callback executed when a field is blurred.(Optional) fieldType: FieldTypeEnum (optional) Set type of field if you want handle event blur and get FieldValidity of specific field.
Returns void Example#
Handling event 'blur' to get specific FieldValidity
onFieldFocus#
onFieldFocus(event, fieldType?): voidEmits an event when a field gains focus.Parameters#
event: (fieldEvent) => void – Callback executed when a field is focused.
(fieldEvent): void
Parameters
fieldEvent:FormValidity | FieldValidity.
Returns voidfieldType?: FieldTypeEnum (optional) – Specifies which field to track.
Returns void
Example#
Handling events 'focus' to get FormValidityHandling event 'focus' to get specific hosted field FieldValidity
onFieldSubmit#
onFieldSubmit(event, fieldType?): voidEmits an event when a field is submitted.Parameters#
event: (fieldEvent) => void – Callback is executed when some field is submitted
(fieldEvent): void
Parameters
fieldEvent:FormValidity | FieldValidity.
Returns voidfieldType?: FieldTypeEnum (optional) – Set type of field if you want handle event submit and get FieldValidity of specific field.
Returns void
Example#
Handling events 'submit' to get FormValidityHandling event 'submit' to get FieldValidity of specific field.
onFieldValidity#
onFieldValidity(event, fieldType?): voidEmits an event when the field validity changes.Parameters#
event: (fieldEvent) => void – Callback is executed when some field changes his validity
(fieldEvent): void
Parameters
fieldEvent:FormValidity | FieldValidity.
Returns voidfieldType?: FieldTypeEnum (optional) – Set type of field if you want handle event validity of specific hosted field
Returns void
Example#
Handling events 'FormValidity' of all hosted fieldsHandling event 'FieldValidity' of cardNumber field
requestCardPayoutToken#
requestCardPayoutToken(): Promise<CardPayoutTokenResponse>Gets a secure token or subscription ID for a card payout transaction.Returns#
Throws#
ERRORS.E002 – If there is an error requesting the payout token.
ERRORS.E007 – If any hosted field is invalid.
Example for one-time token#
Example for subscriptionId token#
reset#
reset(fieldType): Promise<void>Resets a hosted field to its default state.Parameters#
fieldType: FieldTypeEnum – The field to reset.
Returns#
Promise<void> – Resolves when the field is reset.
Throws#
ERRORS.E009 – If an error occurs while resetting the field.
Example#
Modified at 2026-02-02 22:10:25