Document Upload
Document Upload: Create
Parameters
:file
fileThe binary data of the file to upload. Only
png
, jpg
, jpeg
, or pdf
files are supported. The file must not exceed 4MB.:kind
multipleThe type of uploaded document. Value should always be EVIDENCE_DOCUMENT.
Examples
- Ruby
result = gateway.document_upload.create(
{
"kind": Braintree::DocumentUpload::Kind::EvidenceDocument,
"file": File.new("path/to/file", "r"),
}
)
if result.success?
# document successfully uploaded
result.document_upload # a Braintree::DocumentUpload object
else
p result.errors
end