Document Upload

Document Upload: Create

Parameters
The binary data of the file to upload. Only png, jpg, jpeg, or pdf files are supported. The file must not exceed 4MB.
.kind(…)multiple

The type of uploaded document. Value should always be EVIDENCE_DOCUMENT.

ExamplesAnchorIcon

  1. Java
DocumentUploadRequest uploadRequest = new DocumentUploadRequest(
    DocumentUpload.Kind.EVIDENCE_DOCUMENT,
    new File("local_file.pdf")
);

Result<documentupload> result = gateway.documentUpload().create(uploadRequest);

if (result.isSuccess()) {
    // document successfully uploaded
    DocumentUpload document = result.getTarget();
} else {
    System.out.println(result.getErrors());
}

If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more