> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# CreateDisputeEvidenceDocument

# Package: disputes

# Namespace: DisputeEvidenceDocumentService

# Method link: https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/create-dispute-evidence-document.md

## Permission Scopes:
Manage Disputes: SCOPE.DC-PAYMENTS.MANAGE-DISPUTES

## Introduction

Creates a dispute evidence document for a specific dispute.

Use the upload URL in the response to upload your evidence file. Once uploaded, you can submit it by calling [Defend Dispute](https://dev.wix.com/docs/api-reference/business-management/payments/disputes/disputes/defend-dispute.md). Learn how to [upload an evidence document](https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/upload-an-evidence-document.md).

---

## REST API

### Schema

```
 Method: createDisputeEvidenceDocument
 Description: Creates a dispute evidence document for a specific dispute.  Use the upload URL in the response to upload your evidence file. Once uploaded, you can submit it by calling [Defend Dispute](https://dev.wix.com/docs/api-reference/business-management/payments/disputes/disputes/defend-dispute.md). Learn how to [upload an evidence document](https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/upload-an-evidence-document.md).
 URL: https://www.wixapis.com/payments/dispute-evidence-documents/v1/dispute-evidence-documents
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  disputeEvidenceDocument, disputeEvidenceDocument.disputeId
 Method parameters: 
   param name: disputeEvidenceDocument | type: DisputeEvidenceDocument | description: A dispute evidence document represents a file-based piece of evidence submitted to support a payment dispute resolution case.  Evidence documents are created for specific disputes and follow a structured workflow: create the document, upload the file, and submit for dispute resolution. Once submitted, documents become immutable and cannot be deleted or modified. | required: true 
        - name: disputeId | type: string | description: GUID of the dispute this evidence document supports. | required: true | validation: format GUID, immutable
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the dispute evidence document object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
        - name: tags | type: Tags | description: Tags assigned to the dispute evidence document for organization and filtering purposes.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
              - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
           - name: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
 Return type: CreateDisputeEvidenceDocumentResponse
  - name: disputeEvidenceDocument | type: DisputeEvidenceDocument | description: Created dispute evidence document.  
     - name: id | type: string | description: Dispute evidence document GUID.  | read-only: true | validation: format GUID, immutable
     - name: revision | type: string | description: Revision number, which increments by 1 each time the dispute evidence document is updated. To prevent conflicting changes, the existing revision must be specified when updating a dispute evidence document. Ignored when creating a dispute evidence document.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the dispute evidence document was created.  | read-only: true | validation: format date-time, immutable
     - name: updatedDate | type: string | description: Date and time the dispute evidence document was updated.  | read-only: true | validation: format date-time
     - name: disputeId | type: string | description: GUID of the dispute this evidence document supports.  | validation: format GUID, immutable
     - name: file | type: DocumentFile | description: File details for the uploaded evidence document.  If a file hasn't been uploaded yet, this field is `null`.  | read-only: true 
        - name: filename | type: string | description: Name of the uploaded evidence file.  | read-only: true | validation: maxLength 255
        - name: size | type: string | description: Size of the uploaded evidence file in bytes.  | read-only: true | validation: format int64
        - name: checksum | type: string | description: Hexadecimal checksum of the uploaded file.  | read-only: true | validation: minLength 32, maxLength 256
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the dispute evidence document object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
     - name: tags | type: Tags | description: Tags assigned to the dispute evidence document for organization and filtering purposes.  
        - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
           - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
        - name: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
  - name: uploadUrl | type: string | description: URL for uploading the evidence file.  Use this URL to upload the file that will serve as evidence for the dispute. Learn how to [upload an evidence document](https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/upload-an-evidence-document.md).  | validation: format WEB_URL


```

### Examples

### Create DisputeEvidenceDocument
Creates a DisputeEvidenceDocument with basic info

```curl
curl -X POST \
  'https://www.wixapis.com/dispute-evidence-documents/v1/dispute-evidence-documents-entity' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "disputeEvidenceDocument": {
      "lorem": "lorem",
      "ipsum": "lorem ipsum",
      "businessAddress": "Pankivska 14a"
  }'
```

### Create a dispute evidence document
Creates a new evidence document for a chargeback dispute and receives an upload URL for file attachment

```curl
curl -X POST \
'https://www.wixapis.com/dispute-evidence-documents/v1/dispute-evidence-documents' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "disputeEvidenceDocument": {
    "file": {"filename": "evidence1.pd"},
    "tags": {
      "values": ["receipt", "high-priority"]
    }
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.payments.disputeEvidenceDocuments.createDisputeEvidenceDocument(disputeEvidenceDocument)
 Description: Creates a dispute evidence document for a specific dispute.  Use the upload URL in the response to upload your evidence file. Once uploaded, you can submit it by calling [Defend Dispute](https://dev.wix.com/docs/api-reference/business-management/payments/disputes/disputes/defend-dispute.md). Learn how to [upload an evidence document](https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/upload-an-evidence-document.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  disputeEvidenceDocument, disputeEvidenceDocument.disputeId
 Method parameters: 
   param name: disputeEvidenceDocument | type: DisputeEvidenceDocument | description: A dispute evidence document represents a file-based piece of evidence submitted to support a payment dispute resolution case.  Evidence documents are created for specific disputes and follow a structured workflow: create the document, upload the file, and submit for dispute resolution. Once submitted, documents become immutable and cannot be deleted or modified. | required: true 
        - name: disputeId | type: string | description: GUID of the dispute this evidence document supports. | required: true | validation: format GUID, immutable
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the dispute evidence document object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
        - name: tags | type: Tags | description: Tags assigned to the dispute evidence document for organization and filtering purposes.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
              - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
           - name: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
 Return type: PROMISE<DisputeEvidenceDocument>
  - name: _id | type: string | description: Dispute evidence document GUID.  | read-only: true | validation: format GUID, immutable
  - name: revision | type: string | description: Revision number, which increments by 1 each time the dispute evidence document is updated. To prevent conflicting changes, the existing revision must be specified when updating a dispute evidence document. Ignored when creating a dispute evidence document.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the dispute evidence document was created.  | read-only: true | validation: immutable
  - name: _updatedDate | type: Date | description: Date and time the dispute evidence document was updated.  | read-only: true 
  - name: disputeId | type: string | description: GUID of the dispute this evidence document supports.  | validation: format GUID, immutable
  - name: file | type: DocumentFile | description: File details for the uploaded evidence document.  If a file hasn't been uploaded yet, this field is `null`.  | read-only: true 
     - name: filename | type: string | description: Name of the uploaded evidence file.  | read-only: true | validation: maxLength 255
     - name: size | type: string | description: Size of the uploaded evidence file in bytes.  | read-only: true | validation: format int64
     - name: checksum | type: string | description: Hexadecimal checksum of the uploaded file.  | read-only: true | validation: minLength 32, maxLength 256
  - name: extendedFields | type: ExtendedFields | description: Custom field data for the dispute evidence document object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
     - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
  - name: tags | type: Tags | description: Tags assigned to the dispute evidence document for organization and filtering purposes.  
     - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
        - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
     - name: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  


```

### Examples

### createDisputeEvidenceDocument
```javascript
import { disputeEvidenceDocuments } from '@wix/payments';

async function createDisputeEvidenceDocument(disputeEvidenceDocument) {
  const response = await disputeEvidenceDocuments.createDisputeEvidenceDocument(disputeEvidenceDocument);
};
```

### createDisputeEvidenceDocument (with elevated permissions)
```javascript
import { disputeEvidenceDocuments } from '@wix/payments';
import { auth } from '@wix/essentials';

async function myCreateDisputeEvidenceDocumentMethod(disputeEvidenceDocument) {
  const elevatedCreateDisputeEvidenceDocument = auth.elevate(disputeEvidenceDocuments.createDisputeEvidenceDocument);
  const response = await elevatedCreateDisputeEvidenceDocument(disputeEvidenceDocument);
}
```

### createDisputeEvidenceDocument (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { disputeEvidenceDocuments } from '@wix/payments';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { disputeEvidenceDocuments },
  // Include the auth strategy and host as relevant
});


async function createDisputeEvidenceDocument(disputeEvidenceDocument) {
  const response = await myWixClient.disputeEvidenceDocuments.createDisputeEvidenceDocument(disputeEvidenceDocument);
};
```

---