See also the DocumentUpload response object.

availability

The ability to upload documents via the API is currently in a limited release, and the API is subject to change.

Parameters
'file' required, file

The binary data of the file to upload. Only png, jpg, jpeg, or pdf files are supported.

'kind' required, multiple

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

Examples

Python
result = gateway.document_upload.create(
    {
        "kind": braintree.DocumentUpload.Kind.EvidenceDocument,
        "file": open("path/to/file", "rb"),
    }
)

result.is_success
# True

result.document_upload
# a braintree.DocumentUpload object