IDisputesApi disputesApi = client.DisputesApi;
DisputesApi
- List Disputes
- Retrieve Dispute
- Accept Dispute
- List Dispute Evidence
- Remove Dispute Evidence
- Retrieve Dispute Evidence
- Create Dispute Evidence File
- Create Dispute Evidence Text
- Submit Evidence
Returns a list of disputes associated with a particular account.
ListDisputesAsync(string cursor = null, string states = null, string locationId = null)
Parameter | Type | Tags | Description |
---|---|---|---|
cursor |
string |
Query, Optional | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. For more information, see Paginating. |
states |
string |
Query, Optional | The dispute states to filter the result. If not specified, the endpoint returns all open disputes (dispute status is not INQUIRY_CLOSED , WON , or LOST ). |
locationId |
string |
Query, Optional | The ID of the location for which to return a list of disputes. If not specified, the endpoint returns all open disputes (dispute status is not INQUIRY_CLOSED , WON , or LOST ) associated with all locations. |
Task<Models.ListDisputesResponse>
try
{
ListDisputesResponse result = await disputesApi.ListDisputesAsync(null, null, null);
}
catch (ApiException e){};
Returns details of a specific dispute.
RetrieveDisputeAsync(string disputeId)
Parameter | Type | Tags | Description |
---|---|---|---|
disputeId |
string |
Template, Required | The ID of the dispute you want more details about. |
Task<Models.RetrieveDisputeResponse>
string disputeId = "dispute_id2";
try
{
RetrieveDisputeResponse result = await disputesApi.RetrieveDisputeAsync(disputeId);
}
catch (ApiException e){};
Accepts loss on a dispute. Square returns the disputed amount to the cardholder and updates the dispute state to ACCEPTED.
Square debits the disputed amount from the seller’s Square account. If the Square account balance does not have sufficient funds, Square debits the associated bank account. For an overview of the Disputes API, see Overview.
AcceptDisputeAsync(string disputeId)
Parameter | Type | Tags | Description |
---|---|---|---|
disputeId |
string |
Template, Required | ID of the dispute you want to accept. |
Task<Models.AcceptDisputeResponse>
string disputeId = "dispute_id2";
try
{
AcceptDisputeResponse result = await disputesApi.AcceptDisputeAsync(disputeId);
}
catch (ApiException e){};
Returns a list of evidence associated with a dispute.
ListDisputeEvidenceAsync(string disputeId)
Parameter | Type | Tags | Description |
---|---|---|---|
disputeId |
string |
Template, Required | The ID of the dispute. |
Task<Models.ListDisputeEvidenceResponse>
string disputeId = "dispute_id2";
try
{
ListDisputeEvidenceResponse result = await disputesApi.ListDisputeEvidenceAsync(disputeId);
}
catch (ApiException e){};
Removes specified evidence from a dispute.
Square does not send the bank any evidence that is removed. Also, you cannot remove evidence after submitting it to the bank using SubmitEvidence.
RemoveDisputeEvidenceAsync(string disputeId, string evidenceId)
Parameter | Type | Tags | Description |
---|---|---|---|
disputeId |
string |
Template, Required | The ID of the dispute you want to remove evidence from. |
evidenceId |
string |
Template, Required | The ID of the evidence you want to remove. |
Task<Models.RemoveDisputeEvidenceResponse>
string disputeId = "dispute_id2";
string evidenceId = "evidence_id2";
try
{
RemoveDisputeEvidenceResponse result = await disputesApi.RemoveDisputeEvidenceAsync(disputeId, evidenceId);
}
catch (ApiException e){};
Returns the specific evidence metadata associated with a specific dispute.
You must maintain a copy of the evidence you upload if you want to reference it later. You cannot download the evidence after you upload it.
RetrieveDisputeEvidenceAsync(string disputeId, string evidenceId)
Parameter | Type | Tags | Description |
---|---|---|---|
disputeId |
string |
Template, Required | The ID of the dispute that you want to retrieve evidence from. |
evidenceId |
string |
Template, Required | The ID of the evidence to retrieve. |
Task<Models.RetrieveDisputeEvidenceResponse>
string disputeId = "dispute_id2";
string evidenceId = "evidence_id2";
try
{
RetrieveDisputeEvidenceResponse result = await disputesApi.RetrieveDisputeEvidenceAsync(disputeId, evidenceId);
}
catch (ApiException e){};
Uploads a file to use as evidence in a dispute challenge. The endpoint accepts HTTP multipart/form-data file uploads in HEIC, HEIF, JPEG, PDF, PNG, and TIFF formats. For more information, see Challenge a Dispute.
CreateDisputeEvidenceFileAsync(string disputeId, Models.CreateDisputeEvidenceFileRequest request = null, FileStreamInfo imageFile = null)
Parameter | Type | Tags | Description |
---|---|---|---|
disputeId |
string |
Template, Required | ID of the dispute you want to upload evidence for. |
request |
Models.CreateDisputeEvidenceFileRequest |
Form, Optional | Defines parameters for a CreateDisputeEvidenceFile request. |
imageFile |
FileStreamInfo |
Form, Optional | - |
Task<Models.CreateDisputeEvidenceFileResponse>
string disputeId = "dispute_id2";
try
{
CreateDisputeEvidenceFileResponse result = await disputesApi.CreateDisputeEvidenceFileAsync(disputeId, null, null);
}
catch (ApiException e){};
Uploads text to use as evidence for a dispute challenge. For more information, see Challenge a Dispute.
CreateDisputeEvidenceTextAsync(string disputeId, Models.CreateDisputeEvidenceTextRequest body)
Parameter | Type | Tags | Description |
---|---|---|---|
disputeId |
string |
Template, Required | The ID of the dispute you want to upload evidence for. |
body |
Models.CreateDisputeEvidenceTextRequest |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
Task<Models.CreateDisputeEvidenceTextResponse>
string disputeId = "dispute_id2";
var body = new CreateDisputeEvidenceTextRequest.Builder(
"ed3ee3933d946f1514d505d173c82648",
"1Z8888888888888888")
.EvidenceType("TRACKING_NUMBER")
.Build();
try
{
CreateDisputeEvidenceTextResponse result = await disputesApi.CreateDisputeEvidenceTextAsync(disputeId, body);
}
catch (ApiException e){};
Submits evidence to the cardholder's bank.
Before submitting evidence, Square compiles all available evidence. This includes evidence uploaded using the CreateDisputeEvidenceFile and CreateDisputeEvidenceText endpoints, and evidence automatically provided by Square, when available. For more information, see Challenge a Dispute.
SubmitEvidenceAsync(string disputeId)
Parameter | Type | Tags | Description |
---|---|---|---|
disputeId |
string |
Template, Required | The ID of the dispute you want to submit evidence for. |
Task<Models.SubmitEvidenceResponse>
string disputeId = "dispute_id2";
try
{
SubmitEvidenceResponse result = await disputesApi.SubmitEvidenceAsync(disputeId);
}
catch (ApiException e){};