Skip to content

Files upload

Solidgate API for file uploads enables to securely upload files to the system, such as evidence for chargeback disputes or documents required for verification purposes.

Create file

Request

This method allows to create a file upload request by generating a unique file_id to reference the file.

This file can be used for various purposes such as evidence for dispute representment, compliance checks, or other necessary documentation uploads.

Security
merchant and signature
Headers
merchantstringrequired

Unique public key provided upon registration and must be shared for identification purposes.

Example:api_pk_7b197...ba108f842
signaturestringrequired

Request signature that allows verification of merchant authenticity on the payment gateway server.

Example:M2E3OTkyNzcz...xMmExODI4
Bodyapplication/json
file_namestring, [ 1 .. 255 ] characters^[\w,\s-]+\.[A-Za-z]{3,4}$required

Name of the file, including its extension.

Should be provided one of extensions jpg, jpeg, png, gif, txt, pdf, doc, docx, rtf, xls, xlsx, csv.

Example:"document.pdf"
file_typestringrequired

Mime type of the file, must match the extension.

Should be provided one of the following mime types image/jpeg for .jpg/.jpeg, image/png for .png, image/gif for .gif, etc.

Example:"application/pdf"
file_sizeinteger, [ 1 .. 52428800 )required

Size of the file in bytes.

Example:1024000
POST
/file/get-upload-url
curl -i -X POST \
  https://api.solidgate.com/api/v1/file/get-upload-url \
  -H 'Content-Type: application/json' \
  -H 'merchant: YOUR_API_KEY_HERE' \
  -H 'signature: YOUR_API_KEY_HERE' \
  -d '{
    "file_name": "document.pdf",
    "file_type": "application/pdf",
    "file_size": 1024000
  }'

Responses

Request received

Bodyapplication/json
Any of:
file_idstring, <= 255 charactersrequired

Unique identifier of the uploaded file.

upload_urlstring, (uri)required

Pre-signed URL for file content upload.

Response
{ "file_id": "file_01AAABBBCCC123456", "upload_url": "https://storage.example.com/file/x?signature=123" }