This site requires javascript to be enabled.

  • Search AI-powered

Results for

xxx

Upload File

POST https://{domainname}/files/v1/{merchantId}/disputes/{disputeId}

Disputes

The disputes API allows you to dispute chargebacks and to view the status of your existing disputes.

Request

The request for disputes allows you to upload a file as evidence to support a dispute (or your dispute). The allowed file formats are: pdf, zip, txt, doc, docx, png, jpg, gif, jpeg, bmp. The maximum file size is 5MB.

Form parameters

Form parameters for this method

Property Type Required Details
file file yes read close
close

Description

The file that you will upload as evidence to support a dispute.

Request example

SDK: Node.js

This scenario you will probably use the most

  • // contents can be a Readable Stream, Buffer or string
    var fs = require("fs");
    var body = {
      file: {
        fileName: "file.pdf",
        content: fs.createReadStream("file.pdf"),
        contentType: "application/pdf"
      }
    };
    const sdkResponse = await client.v1.disputes.uploadFile("merchantId", "disputeId", body);
    // sdkResponse has the following properties:
    // - status: the HTTP status code
    // - body: the response body
    // - isSuccess: true if the call was successful,
    //              or false if the Worldline Global Collect platform returned an error response
    

Responses

Please find below an overview of the possible responses.

Response 201 - CreatedUploadDisputeFileResponse

An HTTP 201 response is returned when the file upload was successful.

Properties
Property Type Required Details
close

Description

Dispute ID that is associated with the created dispute.
close

Description

The file ID that is associated with the uploaded file. This ID can be used for further communication regarding the file and retrieval of aforementioned property.

Response example

SDK: Node.js

This scenario you will probably use the most

  • {
        "disputeId" : "1234",
        "fileId" : "sample_ref"
    }
    

Response 400 - Bad requestErrorResponse

Either the file size is too large, or the file type is not supported, or the dispute is not in the correct state. The error message will indicate which of these is causing the problem.

Properties
Property Type Required Details
close

Description

Unique reference, for debugging purposes, of this error response
close

Description

List of one or more errors
close

Description

Contains detailed information on one single error.
  • SDK Object type
    APIError
close

Description

Category the error belongs to. The category should give an indication of the type of error you are dealing with. Possible values:
  • CONNECT_PLATFORM_ERROR - indicating that a functional error has occurred in the Connect platform.
  • PAYMENT_PLATFORM_ERROR - indicating that a functional error has occurred in the Payment platform.
  • IO_ERROR - indicating that a technical error has occurred within the Connect platform or between Connect and any of the payment platforms or third party systems.
close

Description

Error code
close

Description

HTTP status code for this error that can be used to determine the type of error
close

Description

ID of the error. This is a short human-readable message that briefly describes the error.
close

Description

Human-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud
close

Description

Returned only if the error relates to a value that was missing or incorrect.
Contains a location path to the value as a JSonata query.
Some common examples:
  • a.b selects the value of property b of root property a,
  • a[1] selects the first element of the array in root property a,
  • a[b='some value'] selects all elements of the array in root property a that have a property b with value 'some value'.
close

Description

ID of the request that can be used for debugging purposes

Response example

SDK: Node.js

This scenario you will probably use the most

  • {
        "errorId" : "5c3d9abf86c7b4a03c52282474dac8ab",
        "errors" : [
            {
                "code" : "310400100",
                "id" : "DISPUTE_DATA_ERROR",
                "category" : "DISPUTE_SERVICE_ERROR",
                "httpStatusCode" : 400
            }
        ]
    }