OptionalonCallback function for each card number change.
Emits when:
Payload shape depends on whether saved payment methods support is enabled (i.e. paymentMethods is provided):
paymentMethods): { token: string | null } — token is null while the number is invalid.
Deprecated: The token-only payload will be removed in a future release. Use CardNumberInfo instead
by passing paymentMethods and relying on CardFormEmbedState.cardNumberInfo / CardFormEmbedState.paymentMethodData in CardFormEmbedState.type: 'STORED_PAYMENT_METHOD' includes { id: string; encryptedCardNumber: null }type: 'ENCRYPTED_CARD_NUMBER' includes { encryptedCardNumber: string; id: null }Make sure to always use the latest value (token/id) and discard any older ones.
OptionalonCallback function for each form state change.
Emits when:
Note: token is deprecated and will be removed in a future release. Prefer using CardFormEmbedState.cardNumberInfo for client-side branching and CardFormEmbedState.paymentMethodData as the value you send to your backend.
OptionalonCallback when a user requests removing a saved card from the list.
This fires when the user clicks the "Remove" link next to a saved card inside the card form UI. You should handle the request on your server and remove the stored payment method using your backend API.
Note: The SDK will not remove the card automatically. Use this callback to
perform the removal and optionally refresh the form by passing an updated
paymentMethods list next time you render.
OptionalonCallback function for when the user submits a valid form,
most of the time using the ↩ Enter key. Optional, improves UX.
OptionaloptionalControls the visibility of various form elements.
true (default): uses each element's default visibility (most are shown; cedulaField is hidden unless explicitly enabled).false: all optional elements are hidden.OptionalcardNetworksInfo?: booleanDisplays a group of card network logos at the bottom of the form.
OptionalcedulaField?: booleanNote: This field is hidden by default. Set to true to explicitly show it.
OptionaldccInfo?: booleanDisplays some info about dynamic currency conversion at the bottom of the form.
OptionalemailField?: booleanDisplays 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.
OptionalfirstNameField?: booleanOptionallastNameField?: booleanOptionalstoreField?: booleanDisplays a checkbox allowing the user to save the card for future payments.
OptionalsubmitLoader?: booleanDisplays a loading indicator over the form, after triggering the CardFormEmbed.pay method.
OptionaltransactionAgreement?: booleanDisplays the transaction terms and conditions for the user to accept.
Do not disable this unless you are already displaying it somewhere else.
OptionalpaymentInitial list of saved payment methods used to populate the card form on mount. PaymentMethods
{
"paymentMethods": [
{
"type": "CARD",
"storedPaymentMethodData": [
{
"type": "CARD",
"id": "693f3244-9919-49ba-91c8-b095a5cf2ffb",
"maskedCardNumber": "************9507",
"expirationDate": "12/26",
"cvcRequiredForPayment": false,
"cardBrand": "MASTERCARD",
"paymentMethodDataOwner": { "name": "Jan Kowal" }
}
]
}
]
}
Specifies a container for the form.
Options for embedCardForm and CardFormEmbed.