await or you can pass in a callback. The callback will be invoked when the field data has been submitted successfully or there was an error.
Once the data is submitted successfully, you are ready to finish the payment on your server.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
await or you can pass in a callback. The callback will be invoked when the field data has been submitted successfully or there was an error.
Once the data is submitted successfully, you are ready to finish the payment on your server.
window.confidoHostedFields.submitFields(callback: SubmitFieldsCallback);
const handleSubmit = async () => {
try {
await window.confidoHostedFields.submitFields();
// the fields were submitted successfully
} catch (error) {
// do something to show the error
}
};
const handleSubmit = () => {
window.confidoHostedFields.submitFields((error) => {
if (error) {
// do something to show the error
return;
}
// else the fields were submitted successfully
});
};