• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Create dispute evidence file BETA

Uploads a file to use as evidence in a dispute challenge.

The endpoint accepts HTTP multipart/form-data file uploads in HEIC, HEIF, JPEG, PDF, PNG, and TIFF formats. For more information, see Challenge a Dispute.

Required permissions: PAYMENTS_WRITE

Path Parameters

Name Description
dispute_id
string

Required

ID of the dispute you want to upload evidence for.

Request Body

Name Description
idempotency_key
string

Required

Unique ID. For more information, see Idempotency.

Max Length 45 Min Length 1
evidence_type
string

The type of evidence you are uploading.

content_type
string

The MIME type of the uploaded file. One of image/heic, image/heif, image/jpeg, application/pdf, image/png, image/tiff.

Max Length 40 Min Length 1

Response Fields

Name Description
errors
Error [ ]

Any errors that occurred during the request.

evidence
DisputeEvidence

The metadata of the newly uploaded dispute evidence.

Examples

You are viewing an old version of the API
POST /v2/disputes/{dispute_id}/evidence_file
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
curl https://connect.squareup.com/v2/disputes/bVTprrwk0gygTLZ96VX1oB/evidence_file \
  -X POST \
  -H 'Square-Version: 2020-06-25' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Accept: application/json' \
  -F 'file=@/local/path/to/file.jpg' \
  -F 'request={}'
Response JSON
{
  "evidence": {
    "evidence_id": "TOomLInj6iWmP3N8qfCXrB",
    "dispute_id": "bVTprrwk0gygTLZ96VX1oB",
    "evidence_file": {
      "filename": "evidence.tiff",
      "filetype": "image/tiff"
    },
    "uploaded_at": "2018-10-18T16:01:10.000Z"
  }
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?