Create a document for a Customer pending verification by uploading a color scan or photo of government issued identification (see below for acceptable document types). This requires a multipart form-data POST request. The uploaded file must be a color image, in a .jpg
, .jpeg
, or .png
format, and less than 10MB in size. Additionally, Business Documents can also be uploaded in a .pdf
format.
Customer type | Acceptable documents |
---|---|
Personal Verified Customer | passport , license , or idCard . Must be a color scan of U.S. government-issued identification. Foreign passports will be rejected with ForeignPassportNotAllowed if uploaded for this customer type. |
Business Verified Customer | Controller documents - passport , license , or idCard .
other . Refer to our guide on Handling Document status for Business Verified Customers for acceptable documents. |
POST https://api.dwolla.com/customers/{id}/documents
Form Field | Description |
---|---|
documentType | Acceptable values of: passport , license , idCard , or other . Refer to the acceptable documents section for more information on how these document types apply to each Customer type. |
file | File contents. |
HTTP Status | Code | Description |
---|---|---|
201 | Created | A document resource was created. |
400 | maximumNumberOfResources | Max of four files upload allowed. Please wait for Dwolla to manually check the documents. |
400 | invalidFileType | File types supported: Personal IDs - .jpg , .jpeg or .png . Business Documents - .jpg , .jpeg , .png , or .pdf . |
400 | DuplicateResource | Document already exists. Follow the link to find the existing document for the Customer. |
403 | invalidResourceState | Resource cannot be modified. Document creation not allowed for already verified Customers or non-verified Customer types. |
403 | notAuthorized | Not authorized to create documents. |
404 | notFound | Customer not found. Check CustomerId. |
413 | fileTooLarge | Document requests are limited to 10 MiB. |
// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
// Using form-data - https://github.com/form-data/form-data (Not Maintained By Dwolla)
var customerUrl =
"https://api-sandbox.dwolla.com/customers/1de32eC7-ff0b-4c0c-9f09-19629e6788ce";
var requestBody = new FormData();
requestBody.append("file", fs.createReadStream("mclovin.jpg"), {
filename: "mclovin.jpg",
contentType: "image/jpeg",
knownLength: fs.statSync("mclovin.jpg").size,
});
requestBody.append("documentType", "license");
dwolla
.post(`${customerUrl}/documents`, requestBody)
.then((res) => res.headers.get("location")); // => "https://api-sandbox.dwolla.com/documents/fb919e0b-ffbe-4268-b1e2-947b44328a16"
Use sandbox environment to test API requests.
All funds transfers made using the Dwolla Platform are performed by a financial institution partner, and any funds held in a Dwolla Balance are held by a financial institution partner. Learn more about our financial institution partners.