Document Uploads - Handling Failures/Retries

When a document goes through the various failure statuses, what is the recommended way to handle it?

Should the document be deleted before another upload is attempted? Will subsequent uploads trigger a DuplicateResource error if not?

H @jmtichell – when a document fails approval, we recommendation surfacing the failure reason to the User and prompting them to upload a different document which is valid.

There isn’t a way to remove a Document. A DuplicateResource error is returned when the same doc is uploaded again.

Hope that helps!

How does Dwolla determine if the document is a duplicate?

Ah, sorry for the confusion – when I saiid “the same doc” I meant to say the same file. For example, if a Document is uploaded and fails with a "ScanNotReadable" error, the user can upload a picture of the same document, but not upload the same file that was previously uploaded which failed verification.

Thank you for the help. If a user were to do the following, would step #3 succeed - or would it fail since the filename is the same?

  1. User uploads a .jpeg of a driver’s license named my_license.jpeg
  2. Dwolla can’t read the file and returns a “ScanNotReadable” error.
  3. User uploads a NEW scan of the drvier’s license also named my_license.jpeg.

In this case, #3 would succeed in uploading since the actual file would be different.

Thanks for the clarification!

I’m still having difficulties with this. When I upload the failure test license, I’m not able to re-upload the file (to trigger/test the customer_verification_document_failed webhook) and receive this response when I try and do so:

{"code":"DuplicateResource","message":"Document already exists.","_links":{"about":{"href":"","type":"application/vnd.dwolla.v1.hal+json","resource-type":"document"}}}

I’m retrieving the URL that I am uploading the file to from the Dwolla Retreive Customer endpoint:

Based on the earlier responses, I would expect this to return a ScanNotReadable or other error, not that the document is a duplicate.

@sherya I’m having similar issues testing the failure and success of documentation. We have a mobile app only, so I save the images to my photo area. Should this work?

Hi @jmtichell – it sounds like the same failed sample doc is being uploaded twice. If so, the second upload will fail with the DuplicateResource error. The first document did get rejected with a ScanNotReadable reason.

You’d now have to upload the approved sample doc to move the Customer into a verified status. If you were looking to trigger the customer_verification_document_failed webhook, you’d have to create a new Customer in document and upload the sample failed doc.