Skip to main content
Version: 2019-05-29 (Current)

Upload Dispute Document

Upload evidence documents to support your dispute response. Documents strengthen your case by providing proof to the card issuer.


๐Ÿ”‘API Credentials

Request Parametersโ€‹

Required - 2 fieldsRequired Parameters
โ–ผ
`id`STRING(required)
Dispute ID (path parameter). The dispute must have status "open".
Example:"dspt_test_5xuy4w91xqz7d1w9u0t"
`file`FILE(required)
Evidence document file to upload. Accepted formats: PNG, JPG, PDF.
Example:"delivery-proof.pdf"
Constraints:Maximum file size: 10MB, Formats: PNG, JPG, PDF
Additional - 1 fieldAdditional Parameters

Responsesโ€‹

200

Successful upload

Document uploaded successfully and attached to the dispute.

Response includes:
  • id - Document ID (docu_*)
  • filename - Original filename
  • kind - Document type (if specified)
  • download_uri - URL to download the document
  • created_at - Upload timestamp
  • Document is immediately available for bank review
  • Cannot be deleted once uploaded

400

Bad request

Request validation failed. Check the error message for details.

Common causes:
  • File missing or empty
  • Invalid file format (not PNG, JPG, or PDF)
  • Invalid kind parameter value

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Using public key instead of secret key
  • Incorrect HTTP Basic Auth format

404

Not found

Dispute not found.

Common causes:
  • Incorrect dispute ID
  • Dispute belongs to different account
  • ID typo or formatting error

413

File too large

File size exceeds the 10MB limit.

Resolution:
  • Compress the file to reduce size
  • Split large documents into multiple files
  • Ensure file is under 10MB

422

Unprocessable entity

Document cannot be uploaded to this dispute.

Common causes:
  • Dispute status is not "open" (already pending, won, or lost)
  • Dispute is closed
  • Maximum number of documents reached

Code samplesโ€‹

curl https://api.omise.co/disputes/dspt_test_5xuy4w91xqz7d1w9u0t/documents \
-X POST \
-u skey_test_5xuy4w91xqz7d1w9u0t: \
-F "file=@/path/to/delivery-proof.pdf" \
-F "kind=proof_of_receipt"

Error and result codesโ€‹

Common Error Codesโ€‹

CodeDescriptionResolution
bad_requestInvalid file or parametersCheck file format and kind parameter
authentication_failureInvalid API keyVerify your secret key is correct
not_foundDispute not foundCheck dispute ID is correct
file_too_largeFile exceeds 10MB limitCompress or split the file
invalid_file_formatUnsupported file formatUse PNG, JPG, or PDF
dispute_not_openDispute is not openDocuments can only be added to open disputes

Document Kind Valuesโ€‹

KindDescriptionExample Documents
cardholder_detailsCustomer identity verificationCustomer ID, billing address proof
details_of_purchaseTransaction and order detailsInvoice, order confirmation, receipt
proof_of_receiptDelivery or service confirmationTracking info, signed delivery receipt
proof_of_acceptanceCustomer acknowledgmentEmail correspondence, terms acceptance

Try it outโ€‹

Required - 2 fields
โ–ผ
Additional - 1 fields