The Dispute Document object

You need to create document in order to upload pages on this document. Note that dispute documents function in just the same way KYC documents.

Parameters

Id
string

string:

Maximum length is 255 characters

The item's ID

CreationDate
timestamp

timestamp

When the item was created

Tag
string

string:

Maximum length is 255 characters

Custom data that you can add to this item

DisputeId
string

string:

Maximum length is 255 characters

The Id of a Dispute

Status
DocumentStatus

DocumentStatus:

CREATED, VALIDATION_ASKED, VALIDATED, REFUSED

The Status of the Document

The status of this KYC/Dispute document

Type
DisputeDocumentType

DisputeDocumentType:

DELIVERY_PROOF, INVOICE, REFUND_PROOF, USER_CORRESPONDANCE, USER_ACCEPTANCE_PROOF, PRODUCT_REPLACEMENT_PROOF, OTHER

The type of dispute document

Gives the type of the dispute document

RefusedReasonMessage
string

string:

Maximum length is 255 characters

The message accompanying a refusal

RefusedReasonType
DisputeDocRefusedReasonType

DisputeDocRefusedReasonType:

DOCUMENT_UNREADABLE, DOCUMENT_NOT_ACCEPTED, DOCUMENT_HAS_EXPIRED, DOCUMENT_INCOMPLETE, DOCUMENT_MISSING, SPECIFIC_CASE, DOCUMENT_FALSIFIED, OTHER

The type of refusal reason

The type of reason for refusal

{
"Id": "8494514",
"CreationDate": 12926321,
"Tag": "custom meta",
"DisputeId": "12327031",
"Status": "CREATED",
"Type": "INVOICE_PROOF",
"RefusedReasonMessage": "The document was not readable :-(",
"RefusedReasonType": "DOCUMENT_UNREADABLE"
}

Create a Dispute Document

POST .../v2.01/ClientId

The ID of your client account

/disputes/DisputeId

The Id of a Dispute

/documents/

Parameters

Tag
string

string:

Maximum length is 255 characters

optional

Custom data that you can add to this item

Type
DisputeDocumentType

DisputeDocumentType:

DELIVERY_PROOF, INVOICE, REFUND_PROOF, USER_CORRESPONDANCE, USER_ACCEPTANCE_PROOF, PRODUCT_REPLACEMENT_PROOF, OTHER

The type of dispute document

required

Gives the type of the dispute document

  • View
  • Code
  • Run
  • View
  • Code
  • Run
POST .../disputes/:DisputeId/documents/ HTTP/1.1
Body Parameters :
{
"Tag": "custom meta",
"Type": "INVOICE_PROOF"
}
require_once("mangopay.php");

try {

$DisputeId = 12327031;

$DisputeDocument = new \MangoPay\DisputeDocument();
$DisputeDocument->Tag = "custom meta";
$DisputeDocument->Type = "INVOICE_PROOF";

$Result = $Api->Disputes->CreateDisputeDocument($DisputeId, $DisputeDocument);

} catch(MangoPay\Libraries\ResponseException $e) {
// handle/log the response exception with code $e->GetCode(), message $e->GetMessage() and error(s) $e->GetErrorDetails()

} catch(MangoPay\Libraries\Exception $e) {
// handle/log the exception $e->GetMessage()

}
POST .../disputes//documents/ HTTP/1.1
Body Parameters :
{
"Tag": "",
"Type": ""
}

Create a Dispute Document Page

The maximum size per page is about 7Mb (or 10Mb when base64encoded

POST .../v2.01/ClientId

The ID of your client account

/disputes/DisputeId

The Id of a Dispute

/documents/DisputeDocumentId

The ID of a dispute document

/pages/

Parameters

File
string

string:

Maximum length is 255 characters

required

The base64 encoded file which needs to be uploaded

  • View
  • Code
  • Run
  • View
  • Code
  • Run
POST .../disputes/:DisputeId/documents/:DisputeDocumentId/pages/ HTTP/1.1
Body Parameters :
{
"File": "/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAEBAQEBAQEBAQEBAQECAgMCAgICAgQDAwIDBQQFBQUE BAQFBgcGBQUHBgQEBgkGBwgICAgIBQYJCgkICgcICAj/2wBDAQEBAQICAgQCAgQIBQQFCAgICAgI CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAj/wgARCAAyADIDAREA AhEBAxEB/8QAGwAAAgMBAQEA"
}
require_once("mangopay.php");

try {

$DisputeDocumentId = 12327070;
$DisputeId = 12327031;

$DocumentPage = new \MangoPay\DocumentPage();
$DocumentPage->File = "/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAEBAQEBAQEBAQEBAQECAgMCAgICAgQDAwIDBQQFBQUE BAQFBgcGBQUHBgQEBgkGBwgICAgIBQYJCgkICgcICAj/2wBDAQEBAQICAgQCAgQIBQQFCAgICAgI CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAj/wgARCAAyADIDAREA AhEBAxEB/8QAGwAAAgMBAQEA";

$Result = $Api->Disputes->CreateDisputeDocumentPageFromFile($DisputeDocumentId, $DisputeId, $DocumentPage);

} catch(MangoPay\Libraries\ResponseException $e) {
// handle/log the response exception with code $e->GetCode(), message $e->GetMessage() and error(s) $e->GetErrorDetails()

} catch(MangoPay\Libraries\Exception $e) {
// handle/log the exception $e->GetMessage()

}
POST .../disputes//documents//pages/ HTTP/1.1
Body Parameters :
{
"File": ""
}

Submit a Dispute Document

PUT .../v2.01/ClientId

The ID of your client account

/disputes/DisputeId

The Id of a Dispute

/documents/DisputeDocumentId

The ID of a dispute document

/

Parameters

Status
DocumentStatus

DocumentStatus:

CREATED, VALIDATION_ASKED, VALIDATED, REFUSED

The Status of the Document

required

The status of this KYC/Dispute document

  • View
  • Code
  • Run
  • View
  • Code
  • Run
PUT .../disputes/:DisputeId/documents/:DisputeDocumentId/ HTTP/1.1
Body Parameters :
{
"Status": "CREATED"
}
require_once("mangopay.php");

try {

$DisputeDocument = new \MangoPay\DisputeDocument();
$DisputeDocument->Id = 12327070;
$DisputeDocument->Status = "CREATED";
$DisputeDocument->Id = 12327031;

$Result = $Api->Disputes->UpdateDisputeDocument($DisputeDocument);

} catch(MangoPay\Libraries\ResponseException $e) {
// handle/log the response exception with code $e->GetCode(), message $e->GetMessage() and error(s) $e->GetErrorDetails()

} catch(MangoPay\Libraries\Exception $e) {
// handle/log the exception $e->GetMessage()

}
PUT .../disputes//documents// HTTP/1.1
Body Parameters :
{
"Status": ""
}

View a Dispute Document

GET .../v2.01/ClientId

The ID of your client account

/dispute-documents/DisputeDocumentId

The ID of a dispute document

/
  • View
  • Code
  • Run
  • View
  • Code
  • Run
GET .../dispute-documents/:DisputeDocumentId/ HTTP/1.1
require_once("mangopay.php");

try {

$DisputeDocumentId = 12327070;

$DisputeDocument = $Api->DisputeDocuments->Get($DisputeDocumentId);

} catch(MangoPay\Libraries\ResponseException $e) {
// handle/log the response exception with code $e->GetCode(), message $e->GetMessage() and error(s) $e->GetErrorDetails()

} catch(MangoPay\Libraries\Exception $e) {
// handle/log the exception $e->GetMessage()

}
GET .../dispute-documents// HTTP/1.1

List all Dispute Documents

You can paginate these HTTP GET requests and also add filters such as BeforeDate, AfterDate, Type (e.g. REFUND_PROOF) and Status (e.g. VALIDATED).

GET .../v2.01/ClientId

The ID of your client account

/dispute-documents/

Get parameters

Page
int

int

optional

The page number of results you wish to return

Per_Page
int

int

optional

The number of results to return per page

Sort
ColumnAndDirection

ColumnAndDirection:

The column to sort against and direction, separated by a :

optional

The column to sort against and direction - only CreationDate (or Date for the events) is available and ASC or DESC for the direction

BeforeDate
timestamp

timestamp

optional

To return only resources that have CreationDate BEFORE this date

AfterDate
timestamp

timestamp

optional

To return only resources that have CreationDate AFTER this date

Status
DocumentStatus

DocumentStatus:

CREATED, VALIDATION_ASKED, VALIDATED, REFUSED

The Status of the Document

optional

The status of this KYC/Dispute document

Type
DisputeDocumentType

DisputeDocumentType:

DELIVERY_PROOF, INVOICE, REFUND_PROOF, USER_CORRESPONDANCE, USER_ACCEPTANCE_PROOF, PRODUCT_REPLACEMENT_PROOF, OTHER

The type of dispute document

optional

The type of the dispute document

  • View
  • Code
    A code sample is not available
  • Run
  • View
  • Code
    A code sample is not available
  • Run
GET .../dispute-documents/ HTTP/1.1
Get Parameters :
{
"Page": 1,
"Per_Page": 25,
"Sort": "CreationDate:DESC",
"BeforeDate": 1463440221,
"AfterDate": 1431817821,
"Status": "CREATED",
"Type": "INVOICE_PROOF"
}
GET .../dispute-documents/ HTTP/1.1
Get Parameters :
{
"Page": ,
"Per_Page": ,
"Sort": "",
"BeforeDate": ,
"AfterDate": ,
"Status": "",
"Type": ""
}

List a Dispute's Documents

GET .../v2.01/ClientId

The ID of your client account

/dispute/DisputeId

The Id of a Dispute

/documents/

Get parameters

Page
int

int

optional

The page number of results you wish to return

Per_Page
int

int

optional

The number of results to return per page

Sort
ColumnAndDirection

ColumnAndDirection:

The column to sort against and direction, separated by a :

optional

The column to sort against and direction - only CreationDate (or Date for the events) is available and ASC or DESC for the direction

BeforeDate
timestamp

timestamp

optional

To return only resources that have CreationDate BEFORE this date

AfterDate
timestamp

timestamp

optional

To return only resources that have CreationDate AFTER this date

Status
DocumentStatus

DocumentStatus:

CREATED, VALIDATION_ASKED, VALIDATED, REFUSED

The Status of the Document

optional

The status of this KYC/Dispute document

Type
DisputeDocumentType

DisputeDocumentType:

DELIVERY_PROOF, INVOICE, REFUND_PROOF, USER_CORRESPONDANCE, USER_ACCEPTANCE_PROOF, PRODUCT_REPLACEMENT_PROOF, OTHER

The type of dispute document

optional

The type of the dispute document

  • View
  • Code
    A code sample is not available
  • Run
  • View
  • Code
    A code sample is not available
  • Run
GET .../dispute/:DisputeId/documents/ HTTP/1.1
Get Parameters :
{
"Page": 1,
"Per_Page": 25,
"Sort": "CreationDate:DESC",
"BeforeDate": 1463440221,
"AfterDate": 1431817821,
"Status": "CREATED",
"Type": "INVOICE_PROOF"
}
GET .../dispute//documents/ HTTP/1.1
Get Parameters :
{
"Page": ,
"Per_Page": ,
"Sort": "",
"BeforeDate": ,
"AfterDate": ,
"Status": "",
"Type": ""
}

Consult a dispute document's pages

POST .../v2.01/ClientId

The ID of your client account

/disputes-documents/DisputeDocumentId

The ID of a dispute document

/consult/
  • View
  • Code
    A code sample is not available
  • Run
  • View
  • Code
    A code sample is not available
  • Run
POST .../disputes-documents/:DisputeDocumentId/consult/ HTTP/1.1
POST .../disputes-documents//consult/ HTTP/1.1