You can use the widget’s events methods, for a successfull response for example:
ok = (credential) => {
console.log('OK!');
console.log(credential);
}
syncWidget.$on('success', ok);
You will see something like this on the logs:
{
"id_credential": "5ea3538f8a2b5d17953eb95d",
"id_job_uuid": "5ea366a5424c4c0df366771d",
"id_job": "5ea366a5424c4c0df366771e",
"is_new": 0,
"username": "E***********6",
"ws": "wss://sync.paybook.com/v1/status/5ea366a5424c4c0df366771e",
"status": "https://sync.paybook.com/v1/jobs/5ea366a5424c4c0df366771e/status",
"twofa": "https://sync.paybook.com/v1/jobs/5ea366a5424c4c0df366771e/twofa"
}
You can read more about Widget’s events in this link to the oficial documentation:
https://www.paybook.com/w/en/sync/public/app/(section:docs/mx/sync/widget/events)