Optional
onOptional
onCallback function for each form state change.
Emits when:
Optional
onCallback function for when the user submits a valid form,
most of the time using the ↩ Enter
key. Optional, improves UX.
Optional
optionalControls the visibility of various form elements. By default, all the elements are enabled.
Optional
cardDisplays a group of card network logos at the bottom of the form.
Optional
dccDisplays some info about dynamic currency conversion at the bottom of the form.
Optional
emailDisplays an additional text field for the user to enter their email address.
Do not disable this unless you already provide the user's email address through another method, such as when setting up a new transaction on your backend.
Optional
submitDisplays a loading indicator over the form, after triggering the CardFormEmbed.pay method.
Optional
transactionDisplays the transaction terms and conditions for the user to accept.
Do not disable this unless you are already displaying it somewhere else.
Specifies a container for the form.
Callback function for each card number change.
Emits only when card number changes:
If CardFormEmbedState.token is
null
, the specified card number is invalid.Make sure to always use the latest
event.token
and discard all the old ones.