File uploader
Last updated: April 2, 2025
The file uploader enables you to upload files to Checkout.com as evidence for a dispute.
Upload a file to use as evidence in a dispute. Your request must be multipart/form-data and the file must be in either JPEG, JPG, PNG, or PDF format, and no larger than 4MB.
It's best practice to:
- Compress files to reduce file size, but aim to maintain overall quality.
- Ensure documents are legible, do not contain blurry or truncated text, and have all four corners visible.
- Use a standard 300 dots per inch (DPI) resolution for passport-style photos, and ensure that they meet facial recognition and clarity requirements.
- Use a 150 to 300 DPI resolution for documents, and ensure that text is legible when zoomed in.
Information
Ensure the files you upload adhere to the dispute evidence file requirements imposed by the schemes.
In your request, include the following fields:
file
– The local path of the file to upload, and its type.purpose
– The purpose of the file upload. You must set this todispute_evidence
orarbitration_evidence
.
Call the Upload file endpoint.
post
https://api.checkout.com/files
1import { Checkout } from 'checkout-node-sdk';23const cko = new Checkout('sk_XXXX');45const file = await cko.files.upload({6path: fs.createReadStream('./test/files/evidence.jpg'),7purpose: 'dispute_evidence',8});
If the response returns a file id
, your request was successful.
1{2"id": "file_6lbss42ezvoufcb2beo76rvwly",3"_links": {4"self": {5"href": "https://api.sandbox.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly"6}7}8}
Call the Provide dispute evidence endpoint to provide the uploaded file as evidence to support a dispute.
Use the following endpoint to retrieve information about a file that you've uploaded.
Call the Get file information endpoint.
get
https://api.checkout.com/files/{file_id}
1import { Checkout } from 'checkout-node-sdk';23const cko = new Checkout('sk_XXXX');45const getFile = await cko.files.getFile('file_zna32sccqbwevd3ldmejtplbhu');
If the response returns a file id
, your request was successful.
1{2"id": "file_6lbss42ezvoufcb2beo76rvwly",3"filename": "receipt.png",4"purpose": "dispute_evidence",5"size": 1024,6"uploaded_on": "2016-05-17T16:48:52.000Z",7"_links": {8"self": {9"href": "https://api.sandbox.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly"10},11"download": {12"href": "https://checkout-file-upload.s3.eu-west-2.amazonaws.com/ucdac/ucdac/6lbss42ezvoufcb2beo76rvwly?X-Amz-Expires=3600&x-amz-security-token=FQoDYXdzENL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEa"13}14}15}