Upload File
Disputes
The disputes API allows you to dispute chargebacks and to view the status of your existing disputes.
Request
The request for disputes allows you to upload a file as evidence to support a dispute (or your dispute). The allowed file formats are: pdf, zip, txt, doc, docx, png, jpg, gif, jpeg, bmp. The maximum file size is 5MB.
Form parameters
Form parameters for this method
Property | Type | Required | Details | |
---|---|---|---|---|
file | file | yes | read close | |
close
DescriptionThe file that you will upload as evidence to support a dispute.
|
Request example
This scenario you will probably use the most
-
UploadFileRequest body = new UploadFileRequest(); InputStream fileContent = new FileInputStream("file.pdf"); body.setFile(new UploadableFile("file.pdf", fileContent, "application/pdf")); try { UploadDisputeFileResponse response = client.v1().merchant("merchantId").disputes().uploadFile("disputeId", body); } finally { fileContent.close(); }
Responses
Please find below an overview of the possible responses.
Response 201 - CreatedUploadDisputeFileResponse
An HTTP 201 response is returned when the file upload was successful.
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
disputeId | string | no | read close |
close
DescriptionDispute ID that is associated with the created dispute.
|
|||
fileId | string | no | read close |
close
DescriptionThe file ID that is associated with the uploaded file. This ID can be used for further communication regarding the file and retrieval of aforementioned property.
|
Response example
This scenario you will probably use the most
-
{ "disputeId" : "1234", "fileId" : "sample_ref" }
Response 400 - Bad requestErrorResponse
Either the file size is too large, or the file type is not supported, or the dispute is not in the correct state. The error message will indicate which of these is causing the problem.
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
errorId | string | yes | read close |
close
DescriptionUnique reference, for debugging purposes, of this error response
|
|||
array of object | yes | read close | |
close
DescriptionList of one or more errors
|
|||
object | no | read close | |
category | string | no | read close |
close
DescriptionCategory the error belongs to. The category should give an indication of the type of error you are dealing with.
Possible values:
|
|||
code | string | yes | read close |
close
DescriptionError code
|
|||
httpStatusCode | integer | no | read close |
close
DescriptionHTTP status code for this error that can be used to determine the type of error
|
|||
id | string | no | read close |
close
DescriptionID of the error. This is a short human-readable message that briefly describes the error.
|
|||
message | string | no | read close |
close
DescriptionHuman-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud
|
|||
propertyName | string | no | read close |
close
DescriptionReturned only if the error relates to a value that was missing or incorrect.
Contains a location path to the value as a JSonata query. Some common examples:
|
|||
requestId | string | no | read close |
close
DescriptionID of the request that can be used for debugging purposes
|
Response example
This scenario you will probably use the most
-
{ "errorId" : "5c3d9abf86c7b4a03c52282474dac8ab", "errors" : [ { "code" : "310400100", "id" : "DISPUTE_DATA_ERROR", "category" : "DISPUTE_SERVICE_ERROR", "httpStatusCode" : 400 } ] }