All URIs are relative to https://connect.squareup.com
Method | HTTP request | Description |
---|---|---|
acceptDispute | POST /v2/disputes/{dispute_id}/accept | AcceptDispute |
createDisputeEvidenceText | POST /v2/disputes/{dispute_id}/evidence_text | CreateDisputeEvidenceText |
listDisputeEvidence | GET /v2/disputes/{dispute_id}/evidence | ListDisputeEvidence |
listDisputes | GET /v2/disputes | ListDisputes |
removeDisputeEvidence | DELETE /v2/disputes/{dispute_id}/evidence/{evidence_id} | RemoveDisputeEvidence |
retrieveDispute | GET /v2/disputes/{dispute_id} | RetrieveDispute |
retrieveDisputeEvidence | GET /v2/disputes/{dispute_id}/evidence/{evidence_id} | RetrieveDisputeEvidence |
submitEvidence | POST /v2/disputes/{dispute_id}/submit-evidence | SubmitEvidence |
Note: This endpoint is in beta.
AcceptDisputeResponse acceptDispute(disputeId)
AcceptDispute
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.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.DisputesApi();
var disputeId = "disputeId_example"; // String | ID of the dispute you want to accept.
apiInstance.acceptDispute(disputeId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
disputeId | String | ID of the dispute you want to accept. |
- Content-Type: application/json
- Accept: application/json
Note: This endpoint is in beta.
CreateDisputeEvidenceTextResponse createDisputeEvidenceText(disputeId, body)
CreateDisputeEvidenceText
Uploads text to use as evidence for a dispute challenge. For more information, see Challenge a Dispute.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.DisputesApi();
var disputeId = "disputeId_example"; // String | The ID of the dispute you want to upload evidence for.
var body = new SquareConnect.CreateDisputeEvidenceTextRequest(); // CreateDisputeEvidenceTextRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
apiInstance.createDisputeEvidenceText(disputeId, body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
disputeId | String | The ID of the dispute you want to upload evidence for. | |
body | CreateDisputeEvidenceTextRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
CreateDisputeEvidenceTextResponse
- Content-Type: application/json
- Accept: application/json
Note: This endpoint is in beta.
ListDisputeEvidenceResponse listDisputeEvidence(disputeId)
ListDisputeEvidence
Returns a list of evidence associated with a dispute.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.DisputesApi();
var disputeId = "disputeId_example"; // String | The ID of the dispute.
apiInstance.listDisputeEvidence(disputeId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
disputeId | String | The ID of the dispute. |
- Content-Type: application/json
- Accept: application/json
Note: This endpoint is in beta.
ListDisputesResponse listDisputes(opts)
ListDisputes
Returns a list of disputes associated with a particular account.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.DisputesApi();
var opts = {
'cursor': "cursor_example", // String | 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](https://developer.squareup.com/docs/basics/api101/pagination).
'states': "states_example", // String | 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': "locationId_example" // String | 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.
};
apiInstance.listDisputes(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
cursor | String | 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. | [optional] |
states | String | 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`). | [optional] |
locationId | String | 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. | [optional] |
- Content-Type: application/json
- Accept: application/json
Note: This endpoint is in beta.
RemoveDisputeEvidenceResponse removeDisputeEvidence(disputeId, evidenceId)
RemoveDisputeEvidence
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.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.DisputesApi();
var disputeId = "disputeId_example"; // String | The ID of the dispute you want to remove evidence from.
var evidenceId = "evidenceId_example"; // String | The ID of the evidence you want to remove.
apiInstance.removeDisputeEvidence(disputeId, evidenceId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
disputeId | String | The ID of the dispute you want to remove evidence from. | |
evidenceId | String | The ID of the evidence you want to remove. |
- Content-Type: application/json
- Accept: application/json
Note: This endpoint is in beta.
RetrieveDisputeResponse retrieveDispute(disputeId)
RetrieveDispute
Returns details of a specific dispute.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.DisputesApi();
var disputeId = "disputeId_example"; // String | The ID of the dispute you want more details about.
apiInstance.retrieveDispute(disputeId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
disputeId | String | The ID of the dispute you want more details about. |
- Content-Type: application/json
- Accept: application/json
Note: This endpoint is in beta.
RetrieveDisputeEvidenceResponse retrieveDisputeEvidence(disputeId, evidenceId)
RetrieveDisputeEvidence
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.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.DisputesApi();
var disputeId = "disputeId_example"; // String | The ID of the dispute that you want to retrieve evidence from.
var evidenceId = "evidenceId_example"; // String | The ID of the evidence to retrieve.
apiInstance.retrieveDisputeEvidence(disputeId, evidenceId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
disputeId | String | The ID of the dispute that you want to retrieve evidence from. | |
evidenceId | String | The ID of the evidence to retrieve. |
RetrieveDisputeEvidenceResponse
- Content-Type: application/json
- Accept: application/json
Note: This endpoint is in beta.
SubmitEvidenceResponse submitEvidence(disputeId)
SubmitEvidence
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.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.DisputesApi();
var disputeId = "disputeId_example"; // String | The ID of the dispute you want to submit evidence for.
apiInstance.submitEvidence(disputeId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
disputeId | String | The ID of the dispute you want to submit evidence for. |
- Content-Type: application/json
- Accept: application/json