> 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 # 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 - 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). - 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 | description: List of tag GUIDs. - 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. - 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. - name: createdDate | type: string | description: Date and time the dispute evidence document was created. - name: updatedDate | type: string | description: Date and time the dispute evidence document was updated. - name: disputeId | type: string | description: GUID of the dispute this evidence document supports. - name: file | type: DocumentFile | description: File details for the uploaded evidence document. If a file hasn't been uploaded yet, this field is `null`. - name: filename | type: string | description: Name of the uploaded evidence file. - name: size | type: string | description: Size of the uploaded evidence file in bytes. - name: checksum | type: string | description: Hexadecimal checksum of the uploaded file. - 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). - 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 | description: List of tag GUIDs. - 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). ``` ### 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: ' \ -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: ' \ -H 'Content-Type: application/json' \ -d '{ "disputeEvidenceDocument": { "file": {"filename": "evidence1.pd"}, "tags": { "values": ["receipt", "high-priority"] } } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.disputes.DisputeEvidenceDocumentService.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 - 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). - 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 | description: List of tag GUIDs. - 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 - name: _id | type: string | description: Dispute evidence document GUID. - 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. - name: _createdDate | type: Date | description: Date and time the dispute evidence document was created. - name: _updatedDate | type: Date | description: Date and time the dispute evidence document was updated. - name: disputeId | type: string | description: GUID of the dispute this evidence document supports. - name: file | type: DocumentFile | description: File details for the uploaded evidence document. If a file hasn't been uploaded yet, this field is `null`. - name: filename | type: string | description: Name of the uploaded evidence file. - name: size | type: string | description: Size of the uploaded evidence file in bytes. - name: checksum | type: string | description: Hexadecimal checksum of the uploaded file. - 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). - 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 | description: List of tag GUIDs. - 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-hosted) Self-hosted 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); }; ``` ---