Keep the applicant on the page while a file is uploading or validating. Allow continuation after the required documents report valid or warning.
Explain warnings without presenting them as rejections. For incomplete, show which additional part is needed; for fail, ask for a corrected document.
Listen for error, invalid_token, and invalid_api_key. Authentication errors are separate events and are not sent to onError.
When a submission token expires, obtain a fresh token through your backend and replace the widget element. Updating the token attribute on an existing widget does not refresh its requests.
If a request fails, check the submission's documents before asking the applicant to upload the same file again.