File uploader
Last updated: April 29, 2022
Our file uploader allows you to upload files to Checkout.com. You can then use these to provide evidence in 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.
For the full specification, as well as complete request and response examples, see our API reference.
post
https://api.checkout.com/files
1curl https://api.sandbox.checkout.com/files2-H "Authorization: sk_11111111-2222-3333-4444-555555555555"3-F "file=@/path/receipt.png;type=image/png"4-F "purpose=dispute_evidence"
If the response returns a file id
, your request was successful. Take a look at the example response below.
1{2"id": "file_6lbss42ezvoufcb2beo76rvwly",3"_links": {4"self": {5"href": "https://api.sandbox.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly"6}7}8}
Use the following endpoint to retrieve information about a file that you've uploaded.
For the full specification, as well as complete request and response examples, see our API reference.
get
https://api.checkout.com/files/{file_id}
1curl https://api.sandbox.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly2-H "Authorization: sk_11111111-2222-3333-4444-555555555555"
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}