Upload Document

Upload a document to an account

Accounts Overview

curl -X POST \
  'http://api.testwyre.com/v3/accounts/AC-DM4ANREWUNJ/individualGovernmentId?documentType=DRIVING_LICENSE&documentSubType=FRONT&timestamp=1426252182534' \
  --upload-file '/Users/user/passport.pdf' \
  -H 'Content-Type: application/pdf' \
  -H 'Authorization: Bearer SK-XXX-XXX-XXX' \

curl -X POST \
  'http://api.testwyre.com/v3/accounts/AC-DM4ANREWUNJ/individualGovernmentId?documentType=DRIVING_LICENSE&documentSubType=BACK&timestamp=1426252182534' \
  --upload-file '/Users/user/passport.pdf' \
  -H 'Content-Type: application/pdf' \
  -H 'Authorization: Bearer SK-XXX-XXX-XXX' \
// Upload js file used in conjunction with index.html in the next tab
const input = document.querySelector('input');

let uploadToWyre = (data) =>{
    let timestamp = Date.now();
    let headers = {};
    headers['Authorization'] = 'Bearer SK-XXXXXX-XXXXXX-XXXXXX-XXXXXX';
    headers['Content-Type'] = 'image/png';
    fetch(`https://api.testwyre.com/v3/accounts/AC_XXXXXXXXXX/individualGovernmentId?documentType=PASSPORT&timestamp=${timestamp}`, {
        method: "POST",
        headers:  headers,
        body: data.target.files[0]
        }).then(res => {
        console.log("Request complete! response:", res);
    });
}

input.addEventListener('input', uploadToWyre);
<!-- Use in conjusction with upload.js on the previous tab -->
<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">

  <title>Wyre Document Upload</title>

</head>

<body>
    <input type="file">
    <script src="./upload.js"></script>
</body>
</html>

📘

Supported FieldIds

Note: Only individualProofOfAddress,individualGovernmentId, and individualAchAuthorizationForm fieldIds are accepted through this endpoint. Please see Account Overview for more information.

individualAchAuthorizationForm is used to verify a payment method after our compliance team has requested further verification.

Supported Document Types

Document Type

Content-Type(s)

PDF

application/pdf

Images

image/jpeg
image/png

Word Document (.doc or .docx)

application/msword
application/vnd.openxmlformats-officedocument.wordprocessingml.document

📘

Max Filesize

Maximum file upload size is 7.75MB

Language
Authentication
Bearer
URL
Click Try It! to start a request and see the response here!