Upload file

Upload a file to use as evidence in a dispute. Your file must be in either JPEG/JPG, PNG or PDF format, and be no larger than 4MB.

Body
application/json
Responses
  • application/json
  • 401

    Unauthorized

  • 422

    Unprocessable

  • 429

    Too many requests

Request Example for post/files
curl 'https://{prefix}.api.sandbox.checkout.com/files' \
  --request POST \
  --header 'Content-Type: multipart/form-data' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --form 'file=file=@/path/receipt.png;type=image/png' \
  --form 'purpose=dispute_evidence'
{
  "id": "file_6lbss42ezvoufcb2beo76rvwly",
  "_links": {
    "self": {
      "href": "https://{prefix}.api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly"
    }
  }
}