> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Upload an Evidence Document ## Article: Upload an Evidence Document ## Article Link: https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/upload-an-evidence-document.md ## Article Content: # Upload an Evidence Document Upload file-based evidence to support payment dispute resolution cases. When you create a dispute evidence document, you receive an upload URL in the response. You use this upload URL to upload your file directly. After you upload the file, you can submit the evidence. ## Step 1 | Create a dispute evidence document This step creates a new dispute evidence document and provides an upload URL for file attachment. To create a dispute evidence document, call [Create Dispute Evidence Document](https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/create-dispute-evidence-document.md), specifying the dispute ID. Save the `uploadUrl` included in the response. ## Step 2 | Upload the file with the upload URL This step uploads your evidence file by calling the upload URL from the previous step. ### Syntax ``` PUT {{uploadUrl}} ``` ### Authorization This method uses the upload token included in the URL for authorization. You don't need additional authorization.
Important: The upload token expires after 10 minutes, so the upload URL must be used within 10 minutes of receiving it.### Headers params | Name | Type | Optional | Description | |--------------|--------|:--------:|---------------------------------------------------------------| | Content-Type | string | no | File content type. For example, "image/jpeg" for a jpg file. | >**Note:** You can use the standard [File API](https://developer.mozilla.org/en-US/docs/Web/API/File_API) to retrieve the file content type using the [File](https://developer.mozilla.org/en-US/docs/Web/API/File) or [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) `type` attributes. > You can also use external libraries, such as [file-type](https://www.npmjs.com/package/file-type), to retrieve the file content type. ### Examples #### JavaScript ```javascript const uploadUrl = 'https://upload.wixapis.com/upload/token123/dispute-evidence?filename=receipt.pdf'; const file = // Retrieve file fetch(uploadUrl, { method: 'PUT', body: file, }); ``` #### Curl ```bash curl -X PUT \ 'https://upload.wixapis.com/upload/token123/dispute-evidence?filename=receipt.pdf' \ -H 'Content-Type: application/pdf' \ --data-binary @./evidence/receipt.pdf ``` > **Note:** The upload process is asynchronous. A successful response doesn't guarantee the file is immediately available. The file processing happens in the background. When the upload is complete, the [Dispute Evidence Document Updated](https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/dispute-evidence-document-updated.md) event is triggered. ## What's next To submit the evidence to the payment processor or bank, call [Defend Dispute](https://dev.wix.com/docs/rest/business-management/payments/disputes/disputes/defend-dispute.md). This submits all evidence documents associated with the dispute for review by the payment processor.